I have flask web application running on aws, my app.py file gives error for "import pymysql" line (whole application is working fine.)
Error.log [Sat Jul 29 06:12:54.545904 2017] [wsgi:error] [pid 28317:tid 140546426812160] [client ] ImportError: No module named pymysql
Python version is -
2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
I created test.py file and executed, it worked and displays rows from database which is on RDS , So no idea why same thing is not working on app.py file , both using same python
**$pip list** click (6.7) Flask (0.12.2) Flask-MySQL (1.4.0) itsdangerous (0.24) Jinja2 (2.9.6) MarkupSafe (1.0) pip (8.1.1) PyMySQL (0.7.11) setuptools (20.7.0) Werkzeug (0.12.2) wheel (0.29.0)
<hname@ip>:/usr/local/lib/python2.7$ ls
dist-packages site-packages
> <hname@ip>:/usr/local/lib/python2.7$ ls dist-packages/ click
> itsdangerous.py click-6.7.dist-info itsdangerous.pyc
> flask jinja2 Flask-0.12.2.dist-info
> Jinja2-2.9.6.dist-info flaskext markupsafe
> Flask_MySQL-1.4.0.dist-info MarkupSafe-1.0.egg-info
> Flask_MySQL-1.4.0-py3.5-nspkg.pth werkzeug itsdangerous-0.24.egg-info
> Werkzeug-0.12.2.dist-info
<hname@ip>:/usr/local/lib/python2.7$ ls site-packages/
<hname@ip>:/usr/local/lib/python2.7$
I also have same application on my laptop with python 3.5.2 and working without any issue...
Tried a lot no clue ...