我刚刚运行了以下命令:
pip install -U steem安装工作进行得很顺利,直到未能安装pycrypto为止。之后我做了
pip install cryptography因为我以为是丢失的包裹。因此,我的问题是,我如何能够安装steem而不出现pycrypto错误(另外还有pycrypto),以及如何卸载我不需要的加密程序包。(我正在使用Windows 7和Python 3)
Requirement already up-to-date: python-dateutil in c:\users\***\appdata\lo
cal\programs\python\python36\lib\site-packages (from dateparser->maya->steem)
...
Installing collected packages: urllib3, idna, chardet, certifi, requests, pycryp
to, funcy, w3lib, voluptuous, diff-match-patch, scrypt, prettytable, appdirs, la
ngdetect, ruamel.yaml, humanize, tzlocal, regex, dateparser, pytzdata, pendulum,
maya, ecdsa, pylibscrypt, ujson, toolz, steem
Running setup.py install for pycrypto ... error
Complete output from command c:\users\***\appdata\local\programs\pytho
n\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\
***~1\\AppData\\Local\\Temp\\pip-build-k6flhu5k\\pycrypto\\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\***N~1\AppDat
a\Local\Temp\pip-igpkll6u-record\install-record.txt --single-version-externally-
managed --compile:
running install
running build
running build_py
...
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
----------------------------------------
Command "c:\users\***\appdata\local\programs\python\python36\python.exe -u
-c "import setuptools, tokenize;__file__='C:\\Users\\***N~1\\AppData\\Local\\
Temp\\pip-build-k6flhu5k\\pycrypto\\setup.py';f=getattr(tokenize, 'open', open)(
__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __fil
e__, 'exec'))" install --record C:\Users\***N~1\AppData\Local\Temp\pip-igpkll6
u-record\install-record.txt --single-version-externally-managed --compile" faile
d with error code 1 in C:\Users\***N~1\AppData\Local\Temp\pip-build- k6flhu5k\p
ycrypto\发布于 2017-07-06 15:54:53
您需要安装Microsoft C++ 14.0才能安装pycrypto:
错误:需要MicrosoftVisualC++ 14.0。使用"Microsoft Visual C++ Build Tools“获得它:http://landinghub.visualstudio.com/visual-cpp-build-tools
在评论中,您会询问要使用哪个链接。使用指向Visual C++ 2015构建工具的链接。它将在不安装Visual的情况下安装Visual 14.0。
备用链接:ARM64.29
在注释中,您将询问不需要安装编译器的安装pycrypto的方法。链接中的二进制文件似乎用于早期版本的Python,而不是您正在使用的版本。一个链接是指向DropBox帐户中的二进制文件。
我不建议下载第三方提供的密码库的二进制版本。要保证您得到的pycrypto版本与您的版本的Python兼容,并且没有使用任何后门构建,唯一的方法是从源代码构建它。
安装了VisualC++之后,只需重新运行原始命令:
pip install -U steem要了解各种安装选项的含义,请运行以下命令:
pip help install-U选项的帮助内容如下
-U, --upgrade Upgrade all specified packages to the newest available
version. The handling of dependencies depends on the
upgrade-strategy used.如果尚未安装steem库,则可以在不使用-U选项的情况下运行该命令。
发布于 2019-03-27 05:04:00
如果您已经安装了,但仍有此错误,则可能需要“修改”您的安装,以包括VisualC++生成工具。
要做到这一点:


在C++工具完成安装后,再次运行pip命令,它应该可以工作。
发布于 2017-11-08 17:11:33
当我试图安装pymssql时,即使在我的系统中安装了VisualC++ 2015 (14.0),我也遇到了这个错误。
我通过从.whl下载pymssql的.whl文件来解决这个错误。
下载后,可以通过以下命令安装:
pip install python_package.whl希望这能有所帮助
https://stackoverflow.com/questions/44951456
复制相似问题