直接pip安装browsercookie出现错误,是因为browsercookie依赖的pycrypto模块安装失败,部分错误代码:
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
如果直接下载pycrypto后使用python setup.py install安装则又出现unable to find vcvarsall.bat错误。按照网上其他文章中的解决办法:先安装Visual Studio 2015,实在麻烦,下载好几个G不说,还不一定成功。
其实有更便捷的解决办法:使用pycryptodome代替pycrypto:pip install pycryptodome安装,再手动下载browsercookie,解压后python setup.py install安装即可。
» 本文来自:乌帮图 » 《Python安装browsercookie模块错误》
» 链接地址:https://wbt5.com/browsercookie.html »英雄不问来路,转载请注明出处。