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

2024-10-01 13:28:39 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经使用pip命令在我的Ubuntu 16.04操作系统中成功地安装了PyMySQL:

debarati@debarati-hp:~$ pip install PyMySQL
Collecting PyMySQL
  Downloading PyMySQL-0.8.0-py2.py3-none-any.whl (83kB)
    100% |████████████████████████████████| 92kB 159kB/s 
Installing collected packages: PyMySQL
Successfully installed PyMySQL-0.8.0

当我试图执行一个名为view的Python文件时_行.py,它给出以下错误:

^{pr2}$

但是,这不会产生任何错误:

debarati@debarati-hp:~$ import PyMySQL 

这是我的Python版本:

debarati@debarati-hp:~$ python -V
Python 3.6.3 :: Anaconda custom (64-bit)

Tags: installpip命令noneubuntu错误py3any