简体   繁体   中英

Troubles with installing _mysql module on pip in azure

I am hosting a PHP/MySQL web app on an Azure Windows server. One of the lines in the PHP executes a python script but the script uses the MySQLdb module which I believe is part of the _mysql module.

I have tried using the pip commands in just about every directory that I could think of. I've also upgraded pip as well

sudo apt-get install python-pip python-dev libmysqlclient-dev

pip install _mysql pip install MySQLdb

D:/home/python364x64/pip.bat install _mysql

Error messages range from "'sudo' is not recognized as an internal or external command, operable program or batch file. to: ERROR: Could not find a version that satisfies the requirement MySQLdb (from versions: none) ERROR: No matching distribution found for MySQLdb

On windows server, you cannot use sudo, please use 'python -m pip' instead. For python 3.x, you should install mysqlclient, If you need 1.2.x versions (legacy Python only), use pip install MySQL-python. See How to install Python MySQLdb module using pip? .

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