简体   繁体   中英

ModuleNotFoundError: No module named 'pymysql' in jupyter

I am getting below error after importing pymysql in jupyter notebook. Please help me to find error.

import pymysql
print("Welcome")

ModuleNotFoundError  
 <ipython-input-5-7978bc79cc40> in <module>()
  1 import pymysql
  2 print("Here")

 ModuleNotFoundError: No module named 'pymysql'

You have not installed the module pymysql Try:

python -m pip install pymysql

Or

python3 -m pip install pymysql

for python3.

It appears that pymsql is not installed in your python environment you are working on.

Please type below command in a cell in jupyter notebook, then run the cell.

 !pip install pymysql

This should resolve your problem.

The reason why despite installation of the pymysql in your system, the issue ModuleNotFoundError: No module named 'pymysql' occurs is because Anaconda does not recognize this.

Another solution to overcome this issue is to install pymysql in the Anaconda prompt.

Issue: ModuleNotFoundError: No module named 'pymysql'

Solution: Installing pymysql in Anaconda Shell

Thank you, Narasimha Rao

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM