I installed anaconda3 and python 3.9 Looks like anaconda3 is running with python 3.8. When i installed first my jupyter on anaconda3 was working, but i did some changes in path/pythonpath and after that i am getting error on jupyter but it works fine on visual studio. So far i have tried
Below is output from jupyter for path and python path
import os
print("PYTHONPATH:", os.environ.get('PYTHONPATH'))
print("PATH:", os.environ.get('PATH'))
*******************************************************************
PYTHONPATH: C:\Users\sachi\anaconda3\python.exe
PATH: C:\Users\sachi\anaconda3;C:\Users\sachi\anaconda3\Library\mingw-w64\bin;C:\Users\sachi\anaconda3\Library\usr\bin;C:\Users\sachi\anaconda3\Library\bin;C:\Users\sachi\anaconda3\Scripts;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;c:\users\sachi\appdata\local\programs\python\python39\lib\site-packages;C:\Python38\python.exe;C:\Users\sachi\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\sachi\AppData\Local\Programs\Python\Python39\;C:\Users\sachi\AppData\Local\Microsoft\WindowsApps;C:\Users\sachi\AppData\Local\Programs\Microsoft VS Code\bin;c:\Python39;
*******************************************************************
Below is the error I get when I import pandas as pd
in jupyter
ImportError Traceback (most recent call last)
<ipython-input-4-7dd3504c366f> in <module>
----> 1 import pandas as pd
~\pandas\__init__.py in <module>
14
15 if missing_dependencies:
---> 16 raise ImportError(
17 "Unable to import required dependencies:\n" + "\n".join(missing_dependencies)
18 )
ImportError: Unable to import required dependencies:
numpy:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.8 from "C:\Users\sachi\anaconda3\python.exe"
* The NumPy version is: "1.20.3"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: No module named 'numpy.core._multiarray_umath'
You can enter pip uninstall pandas
first, Then enter pip uninstall numpy
. These two step is to uninstall two modular. Ater that,you can enter pip install pandas
and pip install numpy
to reload two modular. That's how I solved the problem I just met
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.