jupyter notebook abnormal import third-party modules (Python success in cmd import module, but in jupyter notebook in No module xxx found)

Computer originally installed python 3.8.0, installed after using anaconda jupyter notebook, install third-party libraries with pip3 install has been successful.

Today need to connect mysql, encounter problems when installing third-party libraries pymysql: can be successfully used after pip3 install pymysql in the python is idle, in jupyter notebook in the prompt

ModuleNotFoundError: No module named 'pymysql'

And anaconda prompt examination pymysql did the installation was successful.

 

Try one: the Internet to find a solution, the environment variable in question (Reference: https://www.cnblogs.com/jisongxie/p/9892660.html )

After modify environment variables, the successful implementation of import pymysql. But the use of other libraries such as numpy, etc. but error.

Try two: probably Jupyter of Kernel errors using Python version inconsistency caused by the replacement Jupyter Notebook kernel version of Python to solve this problem. (Reference: https://blog.csdn.net/sinat_34328764/article/details/83214172 )

I itself is mounted with the anaconda python 3.8.0 installed jupyter notebook 3.7.4 interpreter really inconsistent, not connected to the server / (¨Ò ¨Ò o) / ~~ modified by the kernel jupyter notebook.

Try three: Try three: Uninstall the anaconda, with pip reinstalled jupyter notebook. problem solved.

Released two original articles · won praise 1 · views 1530

Guess you like

Origin blog.csdn.net/u010738528/article/details/104064696