emsig / emg3d

A multigrid solver for 3D electromagnetic diffusion
https://emg3d.emsig.xyz
Apache License 2.0
66 stars 7 forks source link

Error to import emg3d #69

Closed kashkoulimohammad closed 4 years ago

kashkoulimohammad commented 4 years ago

Dear Dieter,

I installed emg3d by pip and after that I wanted to import it but I faced with this error:

(base) mohammad@ubuntu:~$ pip3 install emg3d
Collecting emg3d
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/c1/d4/7d2a18dc68cb4e65d1b58a7cd501bfd26cbd7e9180736fbe3d02a326d547/emg3d-0.9.1-py3-none-any.whl (65kB)
    100% |████████████████████████████████| 71kB 49kB/s 
Collecting numba>=0.40.0 (from emg3d)
  Downloading https://files.pythonhosted.org/packages/53/34/22b6c2ded558976b5367be01b851ae679a0d1ba994de002d54afe84187b5/numba-0.46.0-cp36-cp36m-manylinux1_x86_64.whl (3.6MB)
    100% |████████████████████████████████| 3.6MB 158kB/s 
Collecting numpy>=1.15.0 (from emg3d)
  Downloading https://files.pythonhosted.org/packages/d2/ab/43e678759326f728de861edbef34b8e2ad1b1490505f20e0d1f0716c3bf4/numpy-1.17.4-cp36-cp36m-manylinux1_x86_64.whl (20.0MB)
    100% |████████████████████████████████| 20.0MB 42kB/s 
Collecting scipy>=1.1.0 (from emg3d)
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/54/18/d7c101d5e93b6c78dc206fcdf7bd04c1f8138a7b1a93578158fa3b132b08/scipy-1.3.3-cp36-cp36m-manylinux1_x86_64.whl (25.2MB)
    100% |████████████████████████████████| 25.2MB 33kB/s 
Collecting empymod (from emg3d)
  Downloading https://files.pythonhosted.org/packages/ad/01/b257911dbc987a440be8972384798a368b41be870526959eebc48142f49c/empymod-1.10.3-py3-none-any.whl (217kB)
    100% |████████████████████████████████| 225kB 304kB/s 
Collecting llvmlite>=0.30.0dev0 (from numba>=0.40.0->emg3d)
  Downloading https://files.pythonhosted.org/packages/b3/93/924788871a889ead1c115ba2d43e67932a8865d38fdb179505c99e4bb575/llvmlite-0.30.0-cp36-cp36m-manylinux1_x86_64.whl (20.2MB)
    100% |████████████████████████████████| 20.2MB 39kB/s 
Installing collected packages: numpy, llvmlite, numba, scipy, empymod, emg3d
Successfully installed emg3d-0.9.1 empymod-1.10.3 llvmlite-0.30.0 numba-0.46.0 numpy-1.17.4 scipy-1.3.3
(base) mohammad@ubuntu:~$ python3
Python 3.7.3 (default, Mar 27 2019, 22:11:17) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import emg3d
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'emg3d'
>>> exit()

Regards, Mohammad

prisae commented 4 years ago

That is very weird. If you do a which pip3 in the terminal, what is the result? Did you try to install it with conda install -c conda-forge emg3d?

kashkoulimohammad commented 4 years ago

Thanks for replying. No, I didn't. I will try and let you know.

prisae commented 4 years ago

What I see is that your pip3 install emg3d also installs numpy, scipy, etc. However, afterwards you use anaconda. I would expect that in your anaconda environment there would already be numpy and scipy (unless you installed via miniconda. So my suspicion is that your pip3 points to another environment than your python3. But there might be other possibilities too, of course.

kashkoulimohammad commented 4 years ago

Thanks . My problem solved by use conda.