I am having this issue when running my code in PyCharm. other of my codes where I don't import pandas or NumPy work fine.
I have tried the suggested solution in this previous question in my terminal:
pip install --user --force-reinstall --ignore-installed --no-binary :all: pandas
But I get the following error:
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
I am stock and don't know what to do from here.
Thanks to some comments above, I managed to find the solution.
First thing, I opened other projects where I import pandas and numpy. I ran one of the codes and all worked.
Then I compare the versions of the libraries (numpy and pandas) between environments. The versions of the environment I was having issues were not up to date. So I went to the terminal, I activate the environment with the problem and I installed the same versions in other environments
pip install numpy==1.19.5
pip install pandas==1.1.5
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.