简体   繁体   中英

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. When I try to install pymysql to it, Following messages is shown on the terminal.

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.

to make yourself sure that you're using the same version of python i recommend you to to proceed as follow :

$ python --version  
  python X.X

$ pythonX.X -m pip install pymsql

$ python app.py

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