On Windows pip install packages often fail, you may need to know this site

It began: One day, a sudden need to install on windows mysqlclient, get a variety of post-Microsoft compiler environment or failure, how are not installed on the final document by way whl finally loaded on. (Useless anaconda tried, I heard anaconda install some package will be easier, but it is too much, and we have not installed)

prompt

Written at the top, not forced to installation package better not to use the methods described herein.

whl file installation

First to https://www.lfd.uci.edu/~gohlke/pythonlibs/ on this site to find whl file corresponds to the version you need, with regard to mysqlclient example:

I am a 64-bit python3.7, so I chose this version

After downloading can be installed directly on whl file after someone else has essentially compiled packet compression, and then place it on your computer decompression.

# cd进whl文件所在的目录
pip install mysqlclient-1.4.6-cp37-cp37m-win_amd64.whl

Guess you like

Origin www.cnblogs.com/maolonglong/p/12512857.html