Spyder doesn't find the submodule of a module, although it finds the module fine. Thus it is finding the location but not recognising the file maybe? It loads the submodule fine in a python or ipython session of the terminal
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Expected output is for it to load normally. It loads normally in a python or ipython session in the normal terminal window. However in Spyder, it seems to only find the normal module (hashpy) and not the submodule (libhashpy) and produces the following error:
import hashpy
Traceback (most recent call last):
File "<ipython-input-4-c4b8cd1c5277>", line 1, in <module>
import hashpy
File "hashpy/__init__.py", line 13, in <module>
from hashpype import HashPype, HashError
File "hashpy/hashpype.py", line 22, in <module>
from hashpy.libhashpy import (mk_table_add, angtable, ran_norm, get_tts, get_gap,
ImportError: No module named libhashpy
The file with libhashpy is directly within the normal module's folder:
/home/user/anaconda2/lib/python2.7/site-packages/hashpy

Please provide any additional information below
I have already done the following:
Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:
jedi >=0.9.0 : 0.9.0 (OK)
matplotlib >=1.0 : 2.0.2 (OK)
nbconvert >=4.0 : 5.1.1 (OK)
numpy >=1.7 : 1.12.1 (OK)
pandas >=0.13.1 : 0.20.1 (OK)
pep8 >=0.6 : 1.7.0 (OK)
psutil >=0.3 : 5.2.1 (OK)
pyflakes >=0.5.0 : 1.5.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
pylint >=0.25 : 1.6.5 (OK)
qtconsole >=4.2.0: 4.3.0 (OK)
rope >=0.9.4 : 0.10.5 (OK)
sphinx >=0.6.6 : 1.6.1 (OK)
sympy >=0.7.3 : 1.0 (OK)
What happens if you start Spyder from a terminal? Does importing hashpy work in that case?
I always start from terminal because, as you suggest, sometimes things don't work when started from a shortcut. And nope, it doesn't import correctly when spyder is started from a terminal. Does it work on your machine?
I'll try it and let you know what happens in my case.
Another note: It also doesn't work in the normal python console of the Spyder IDE. I'm not sure if it's a true, pure python console or if there's more happening behind the scenes but I would guess that that implies that it's something deeper not working than the iPython console?
The latest update to that project was 5 years ago. I do not think this is specific to Spyder. Closing.