Requirement already satisfied- pymysql in /usr/lib/python3/dist-packages (0.8.0)

Viewed 1708

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'
1 Answers

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
Related