Hi,
you might have the same problem another user had about ~two weeks ago. The issue arises when
downloading a new module into the search path of a different Python version. For example, if you
are using Python v3.12 but numpy was downloaded into your v3.8, then you will run into this issue. So that you don’t run into this issue, uninstall ALL previous versions from your system and make sure you have the latest and greatest version of Python installed. You will have to perform the pip install again since I am assuming the numpy library was downloaded to the earlier version of the Python directory of which you have now uninstalled.
An easy way to tell is execute the following code snippet:
import sys
paths = sys.path
num = 1
for path in paths:
print('{}. {}'.format(num, path))
num += 1
There, you will see your active PYTHONPATH. In the search paths, you’ll see the active
search directories including python versions.
Update:
If you don’t want to uninstall your previous version, then make sure the directory is part of the active PYTHONPATH via the following commands:
sys.path.append(r'C:\folder1\folder2\folder_n') # Add your directory path here
where C:\folder1\folder2\folder_n is the location of the numpy library package.
Or open the same IDLE version where your numpy library package was downloaded to., of course. ![]()