[英]Requirement already satisfied- pymysql in /usr/lib/python3/dist-packages (0.8.0)
I implemented the python flask application, created the vitual environment and activated it. 我实现了python flask应用程序,创建了虚拟环境并激活了它。 When I try to install pymysql to it, Following messages is shown on the terminal.
当我尝试向其安装pymysql时,终端上将显示以下消息。
Requirement already satisfied: pymysql in /usr/lib/python3/dist-packages (0.8.0)
But when I try to run it. 但是当我尝试运行它时。 It gives the following error.
它给出以下错误。
Traceback (most recent call last):
File "app.py", line 4, in <module>
import pymysql
ImportError: No module named 'pymysql'
Use the same Python3 to execute your app.py file. 使用相同的Python3执行您的app.py文件。
to make yourself sure that you're using the same version of python i recommend you to to proceed as follow : 为了确保自己使用的是相同版本的python,我建议您按照以下步骤进行操作:
$ python --version
python X.X
$ pythonX.X -m pip install pymsql
$ python app.py
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.