我已经使用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)
包名为“PyMySQL”;您可以使用包名来安装它。要使用已安装的软件包,您需要使用模块名称,该名称可能不相同。在本例中,模块名为“pymysql”(都是小写)。在
导入应该是
import pymysql
。在https://pymysql.readthedocs.io/en/latest/py-modindex.html
相关问题 更多 >
编程相关推荐