我刚刚运行了以下命令:

pip install -U steem

安装工作一直很好,直到安装pycrypto个都失败了.

pip install cryptography

因为我以为那是丢失的Package.

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\

推荐答案

你需要安装微软Visual C++ 14来安装PyCito:

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual
C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

在 comments 中,你会问应该使用哪个链接.使用Visual C++ 2015 Build Tools的链接.这将安装VisualC++ 14而不安装VisualStudio.

在 comments 中,您询问了安装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选项的情况下运行该命令.

Python-3.x相关问答推荐

如何通过Pandas为不同的列集垂直设置列数据?

正确的本地react 方式-Django身份验证

在 sum() 中将字符串转换为 int (或 float)

如何将项目添加到Python中具有固定大小的列表列表中

如何将函数映射到所有命名元组的元素?

Pandas 转换为日期时间

从 https://www.niftytrader.in/stock-options-chart/sbin 提取 SBIN 股票最大痛苦值的 Python 代码不起作用 - 我错过了什么?

如何通过从特定列创建分组多标题来reshape 数据框?

如何使用 regex sub 根据列表中的变量替换字符

过滤查询集和Q运算符的不同值

python3源的类图查看器应用程序

使用 python 正则表达式匹配日期

在带有 M1 芯片(基于 ARM 的 Apple Silicon)的 Mac 上安装较早版本的 Python(3.8 之前)失败

为什么包含类的名称不被识别为返回值函数注释?

PySpark python 问题:Py4JJavaError: An error occurred while calling o48.showString

登录csv文件的正确方法是什么?

无 Python 错误/错误?

当 None 被传递时,如何将默认值应用于 python 数据类字段?

plt.cm.get_cmap 中可以使用哪些名称?

如何替换 Python pathlib.Path 中的子字符串?