Closed Yao1993 closed 2 years ago
Hello Yao, Thank you for this installation tool. I'm doing some tests checking if everything works on Windows and Linux. Could you send me few lines about this tool ? (How to use it, I have no experience with python setuptools) I will commit your code when I'm done testing. kind regards Didier
I have made a fix for Windows and use following codes to test.
# Create a new python environment
conda create -n ggems_test python=3.9 -y
conda activate ggems_test
git clone https://github.com/Yao1993/ggems.git
cd ggems
git swtich yao
# Build and install ggems
python setup.py install
# Test
python examples/0_Cross_Sections/cross_sections.py -m Air -p Compton -e 0.05
I also edit the cpp code.
The member variable number_of_voxels_
is uninitialized in GGEMSSolid
. However, the destructor function GGEMSSolid::~GGEMSSolid
use the value of number_of_voxels_
to deallocate label_data_
and solid_data_
.
https://github.com/GGEMS/ggems/blob/bddf3ecf729936fd579d99f197326d3580252f34/src/geometries/GGEMSSolid.cc#L105
I found this problem when deconstructing GGEMSCTSystem
.
Hi Yao, I did a quick test, it seems to work fine. Just a few remarks:
python setup.py install --user
(I did not have administrator rights)Thanks for the bug concerning the initialization of the variable number_of_voxels_
I add options for OpenGL and cmake generators.
# Build ggems with custom options
python setup.py build_ext --generator=Ninja --opengl=ON
# Then install it
python setup.py install
Hi Yao,
I did some tests using the latest version of your install script, it works fine, but I have a problem regarding OpenGL on Windows. I use the command python setup.py build_ext --generator=Ninja --opengl=ON --examples=ON
then python setup.py install --user
. But when I run the 6_Visualization example I get the following error:
Traceback (most recent call last):
File "
Have you encountered this error before?
Also is it normal that during installation setuptools recompiles the entire GGEMS library?
@didierbenoit Sorry, I made a mistake when installing ggems with opitons.
python setup.py build_ext --generator=Ninja --opengl=ON --examples=ON
# ggems will be compiled and installed with default options.
python setup.py install --user
The right solution is making setuptool execute build_ext
first and then install
in one command.
python .\setup.py build_ext --opengl=ON install
I just want to use
python setup install
to compile and install.