I am using a module called investpy, and numpy is a dependency of it. I tried running pip install investpy, which installed all of the dependencies (or so it says). However, when I try running
, I am faced with this error:
Traceback (most recent call last): File "C:UserskakorOneDriveDesktopMLnumpy__init__.py", line 124, in <module> from numpy.__config__ import show as show_config ModuleNotFoundError: No module named 'numpy.__config__' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:UserskakorOneDriveDesktopMLstockscreener.py", line 1, in <module> import numpy File "C:UserskakorOneDriveDesktopMLnumpy__init__.py", line 129, in <module> raise ImportError(msg) ImportError: Error importing numpy: you should not try to import numpy from its source directory; please exit the numpy source tree, and relaunch your python interpreter from there.
I’m really confused as to why this is happening, because as far as I know, I correctly installed numpy. Furthermore, this is really weird because, if I go to the python directory in cmd and run import numpy, it works perfectly.
Any help would be greatly appreciated. Thank you!
Source: Windows Questions