win10上安装的pycharm,在pycharm创建的py2.7虚拟环境中安装flask-sqlalchemy
执行pip install flask-mysqldb报错
error: Microsoft Visual C++ 9.0 is required. Get it from http://ak
a.ms/vcpython27
到报错链接下载该文件,然后安装后,仍然报错
Building wheel for mysqlclient (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: ‘e:\code\myscripts\virtualenv\scripts\python.exe‘ -u -c ‘i
mport sys, setuptools, tokenize; sys.argv[0] = ‘"‘"‘c:\users\admini~
1\appdata\local\temp\pip-install-nuo20j\mysqlclient\setup.py‘"‘"
‘; file=‘"‘"‘c:\users\admini~1\appdata\local\tem
解决办法:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python
下载mysqlclient?1.4.6?cp27?cp27m?win_amd64.whl(根据自己py版本及电脑配置下载)
pip install mysqlclient?1.4.6?cp27?cp27m?win_amd64.whl
成功后执行pip install flask-mysqldb
至此完成