Windows 10安裝Python 2.7和MySQL-python


1. 安裝Python

Download Python

2. 安裝MySQL-python

pip install wheel (應該是可選)
pip install mysqlclient==1.3.6

3. 可能出錯

    running build_ext
    building '_mysql' extension
    error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27

會提示安裝vcpython27

Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user\\appdata\\local\\temp\\pip-build-fqbeva\\mysqlclient\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\user\appdata\local\temp\pip-bjcknv-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\user\appdata\local\temp\pip-build-fqbeva\mysqlclient\

安裝mysqlclient不指定版本號可能會出錯,需要指定為mysqlclient==1.3.6


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM