I'm trying to deploy a flask app in a centOS 7.
I installed the connector with: sudo yum install mysql-connector-python
But when I run: python init.py
, I got this error:
from mysql import connector
ImportError: No module named mysql
Note: my project is inside a virtualenv.
Inside my virtualenv:
pip install MySQL-python
Error:Requirement already satisfied (use --upgrade to upgrade): MySQL-python in /root/ams/env/lib/python2.7/site-packages
yum install MySQL-python
Error:Package MySQL-python-1.2.3-11.el7.x86_64 already installed and latest version