ChristophKirst / ClearMap

ClearMap is a python toolbox for the analysis and registration of volumetric data from cleared tissues.
http://christophkirst.github.io/ClearMap/build/html/index.html
GNU General Public License v3.0
49 stars 41 forks source link

No module named 'Cython' #27

Closed aaubry89 closed 5 years ago

aaubry89 commented 5 years ago

Hi,

I am trying to run the setup.py file however, I keep getting the error:

le "setup.py", line 5, in from Cython.Build import cythonize ModuleNotFoundError: No module named 'Cython'

However, I have this module installed in my base anaconda environment. Any ideas on what may be causing this error.

vzickus commented 5 years ago

Using the python version you use to run setup.py try and import cython inside python

So if you did setup.py build && python setup.py install from terminal, run python -c "import cython; print(cython.__version__)"

This is just to check that python definitely can import this module.

aaubry89 commented 5 years ago

if I use an IDE (Spyder) I can import Cython, but if I run setup.py from the terminal I get the error message

vzickus commented 5 years ago

OK, so it's not ClearMap issue. You need to make sure your'e using the same python that has Cython when running ClearMap (check which python is used by Spyder). It's possible you have not set the PATH variable for Anaconda, and the terminal is just using default Python. If you type which python in the terminal it will tell you where it's called from.

aaubry89 commented 5 years ago

its the same path for both Spyder and the terminal.

aaubry89 commented 5 years ago

and if I run the setup.py from Spyder I get the following error message:

Settings: elastix path %s does not exists, cf. Settings.py or type help(Settings) for details.' % ElastixPath; ^ SyntaxError: invalid syntax

Despite have the correct path on line 29 of the settings.py file.

Sorry to be a pain, but I have very little python experience.

vzickus commented 5 years ago

its the same path for both Spyder and the terminal.

Sorry, this is beyond my level of python knowledge. I don't know how that is possible.

can you do pip install cython==0.24 (could be capital C, I can't remember) in terminal, and then try installing clearmap again?

Also, double check you're using recommended package versions (most importantly, Python 2.7 not 3.x!)

aaubry89 commented 5 years ago

I've been using Python 3.7 this whole time.... I'll download 2.7 and give it a try

aaubry89 commented 5 years ago

This worked and I was able to install the program. Thank you!