ModuleNotFoundError:没有使用Jupyter / Panda命名为'pymysql'的模块

时间:2020-02-06 09:34:37

标签: python pandas jupyter pymysql

需要有人的帮助!

执行时在jupyter中发生以下提到的错误

Import pymysql

ModuleNotFoundError Traceback(最近一次调用 最后) ----> 1个导入pymysql

ModuleNotFoundError:没有名为“ pymysql”的模块

以及执行时

create_engine('mysql+pymysql://root:root@localhost:3306/pandas_tutorial')

ModuleNotFoundError Traceback (most recent call last) 
<ipython-input-2-751a940a98c4> in <module> ----> 1 engine = 
 sqlalchemy.create_engine('mysql+pymysql://root:root@localhost:3306/pandas_tutorial')

~\Anaconda3\lib\site-packages\sqlalchemy\engine\__init__.py in create_engine(*args, **kwargs) 
477 strategy = kwargs.pop("strategy", default_strategy) 
478 strategy = strategies.strategies[strategy] 
--> 479 return strategy.create(*args, **kwargs) 
480 
481 
~\Anaconda3\lib\site-packages\sqlalchemy\engine\strategies.py in create(self, name_or_url, **kwargs) 
85 if k in kwargs: 
86 dbapi_args[k] = pop_kwarg(k) 
--->    87 dbapi = dialect_cls.dbapi(**dbapi_args) 
88 
89 dialect_args["dbapi"] = dbapi 
~\Anaconda3\lib\site-packages\sqlalchemy\dialects\mysql\pymysql.py in dbapi(cls) 
60 @classmethod 
61 def dbapi(cls): ---> 
62 return __import__("pymysql") 
63 
64 def is_disconnect(self, e, connection, cursor): 
ModuleNotFoundError: No module named 'pymysql'

操作系统和工具:

Windows 10
Jupyter 6.0.1
Python 3.7.4
Pandas 3

已安装软件包的列表:

mysql       0.0.2
mysqlclient 1.4.6    
pip         20.0.2   
PyMySQL     0.9.3  using "pip install pymysql"   
setuptools  41.2.0
SQLAlchemy  1.3.13 using "pip install sqlalchemy"

0 个答案:

没有答案