I'm on Windows and working on a python file from a cloned gitHub repository. When trying to do
import bitstring as bs
I get this error:
ModuleNotFoundError: No module named 'bitstring'
But "pip list" shows it.
I tried to uninstall and reinstall it and I can install it just fine with pip install bitstring. The problem is related to importing the module.
Its location is d:\programs\anaconda\lib\site-packages , same as numpy, which I can import without problems.
Installing it with python -m pip install bitstring doesn't work
When writing:
import sys
for p in sys.path:
print(p)
I see the same location as when typing in the terminal:
pip show bitstring
I also added the pip path to the environment variables, but the problem still remains.
By writing the following, the code runs, but the module name still remains highlighted as "NotFound", and the debugging gives an error.
import sys
sys.path.append(r'd:\\programs\\anaconda\\lib\site-packages')