I'm using flexible environments and I'd like to know what am I doing wrong when deploying it.
This is my requirements.txt
MySQL-python==1.2.5
If I uninstall this lib on my local computer this error will be thrown:
No module named MySQLdb
When I run "pip install -r requirements.txt" the lib will be installed and I'll able to use MySQLdb with no problems.
The problem is, when I upload this to server it does not install and the error "No module named MySQLdb" is thrown on production...
From what I understood reading some docs, is that I'd only need to specify which libs I want to use and google would do the installing on production.
Am I wrong?
Thanks a lot!
MySql-python doesn't install properly using PyPi/pip. At the time of this question, it required the user to install some other C library, so that's probably why GAE can't install it. However, there are other replacement packages that should provide the exact same functions/API and install using pip.
Another alternative is to install the package directly into your app in a /lib
folder and make sure that the app can install MySql-python correctly, and avoid the requirements.txt installer completely.
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.