peterwittek / somoclu

Massively parallel self-organizing maps: accelerate training on multicore CPUs, GPUs, and clusters
https://peterwittek.github.io/somoclu/
MIT License
268 stars 70 forks source link

No module named 'somoclu' #93

Closed prubbens closed 6 years ago

prubbens commented 6 years ago

Having installed the package somoclu, I get the error: ImportError: No module named 'somoclu', after running import somoclu.

I installed somoclu using the command sudo pip3 install somoclu and also following the guidelines installing somoclu from the github repo. Any ideas what might be the issue? I'm using Python3.4, numpy, ...

peterwittek commented 6 years ago

This is usually a PYTHONPATH error. Are you sure you installed with the same interpreter as the one that you are trying to import it from? A common error is to install with system Python and then run with Anaconda Python, or the other way around.

prubbens commented 6 years ago

Yes, I thought this would be the reason, however running the module from the terminal still gives me the same error.. I'll have a closer look in the meanwhile.

prubbens commented 6 years ago

If this is the case, how can I fix this?

peterwittek commented 6 years ago

I don't know what system you are on, but what do which python and which pip3 return?

prubbens commented 6 years ago

which python: /home/prubbens/anaconda3/bin/python which pip3: /home/prubbens/anaconda3/bin/pip3

And I am using Ubuntu 14.04

peterwittek commented 6 years ago

Did you try conda install somoclu? Before you do that, make sure you clear things up (pip3 uninstall somoclu, quite possibly you have to execute this twice).

prubbens commented 6 years ago

Tried that in the beginning, and now again after uninstalling somoclu, I get the following error: UnsatisfiableError: The following specifications were found to be in conflict: - python 3.4* - somoclu Use "conda info <package>" to see the dependencies for each package.

prubbens commented 6 years ago

Does somoclu only run with >=Python3.5?

peterwittek commented 6 years ago

Right, it only builds for Python 2.7, 3.5 and 3.6. Two ways forward:

  1. Update to 3.5 or 3.6.
  2. If you try from the source (pip or git install), ensure that the compiler is the one of Anaconda, not your system gcc.
prubbens commented 6 years ago

Ok, after some reinstallation work, and dependencies solving, managed to install somoclu. Thanks for the swift responses!