dkazanc / TomoPhantom

Software to generate 2D/3D/4D analytical phantoms and their Radon transforms (parallel beam) for image processing
https://dkazanc.github.io/TomoPhantom/
Apache License 2.0
116 stars 53 forks source link

Problem with installation for Windows via Anaconda (No module named 'tomophantom') #93

Closed Philipstj closed 3 years ago

Philipstj commented 3 years ago

Hello,

I am trying to install Tomophantom to our windows PC, but, the module can not be found, and there are not any files in the Lib\site-packages . Nevertheless, the steps I went through are as follows, create new anaconda environment with python 3.6 then install CMake and visual studios followed by TomoPhantom. I do receive a few files namely "tomophantom-1.4-np114py36_0.json" and its two specified files.

Best regards, Philip

dkazanc commented 3 years ago

Hello Philip, sorry for the late reply. What exactly do you want to do? Do you want to install TomoPhantom in your Python3.6 environment? Have you tried simply running conda install -c ccpi tomophantom If you want to build it then you can try:

set CIL_VERSION=1.4.5
conda build Wrappers\Python\conda-recipe --numpy 1.15 --python 3.7
Philipstj commented 3 years ago

No worries, thanks for the reply.

What I've been trying to do is to get tomophantom to install via anaconda as you mentioned, so via "conda install -c ccpi tomophantom". However, then I do not receive the full package only what appears to be the "info" and "Library" files. To double-check this, I also manually installed two of different available 1.4.0 windows version on the anaconda website. Firstly the "win-64/tomophantom-1.4-np114py36_0.tar.bz2" which is only 33.9 kB and only packs the "info" and "Library" files when extracted, then "win-64/tomophantom-1.4-np111py35_0.tar.bz2" which is 175.9 kB and packs "info", "Lib" and "Library". As anaconda would detect me as "np114py36" I think this is the reason I do not receive the full package.

Additionally, I would have to apologies in advance for I am not that well versed with other ways of package installation than via the anaconda path. Hence if there is a exists a better way of solving the install I would require some further guidance.

Best regards, Philip

dkazanc commented 3 years ago

OK, so you're saying that your install doesn't work and you've tried to run a demo? I see quite small archive sizes for tomophantom 1.4 windows version indeed. This could be an issue with a build at that time. I've just rebuilt it for your configuration, try to run conda install -c dkazanc tomophantom and see if it works for you?

Philipstj commented 3 years ago

Thanks so much for the help and the quick response Dkazanc, "conda install -c dkazanc tomophantom" appears to have solved it as the demos now works.

ginsanity15 commented 3 years ago

Hi Daniil,

I have encountered a similar issue. I tried to install TomoPhantom in Windows 10 through conda install -c ccpi tomophantom and conda install -c dkazanc tomophantom, but neither of them works.

Like Philip, I have also visited Anaconda cloud and tried to install TomoPhantom manually. Unfortunately, it does not solve the problem. May I know if there is any alternative approach for me to use it in Python?

Kind regards, Bo

dkazanc commented 3 years ago

Hi Bo, thanks for the comment. What is you python and numpy version?

ginsanity15 commented 3 years ago

Hey Danill,

Thanks for your quick reply, I am using Python 3.6.8 and the numpy version is 1.15.4. Let me know if I could provide more information to you.

Kind regards, Bo

dkazanc commented 3 years ago

Hi Bo,

I've compiled for your requirements. Can you please try: conda install -c dkazanc tomophantom

ginsanity15 commented 3 years ago

Hi Danill,

Thanks for doing this for me, now I can generate phantoms with TomoPhantom without any problem.

Kind regards, Bo

dkazanc commented 3 years ago

thanks Bo. Windows builds should now be accessible through conda install tomophantom -c ccpi as well.