首页 > 解决方案 > Pycharm 构建轮:“错误:命令错误,退出状态为 1”

问题描述

情况: 我有这个错误

File "D:\Documents\Python_projects\stable_env\lib\site-packages\pyrebase\pyrebase.py", line 23, in <module> from Crypto.PublicKey import RSA ModuleNotFoundError: No module named 'Crypto'

解决方法:我试过pip3 install pyrebase

问题: ERROR: Failed building wheel for pycryptodome

  Moving to d:\documents\python_projects\stable_env\lib\site-packages\crypto\
   from d:\documents\python_projects\stable_env\lib\site-packages\~rypto
  Moving to d:\documents\python_projects\stable_env\lib\site-packages\pycryptodome-3.10.4.dist-info\
   from d:\documents\python_projects\stable_env\lib\site-packages\~ycryptodome-3.10.4.dist-info
ERROR: Command errored out with exit status 1: 'd:\documents\python_projects\stable_env\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\
aymer\\AppData\\Local\\Temp\\pip-install-yxkp7g76\\pycryptodome_a53664fc52004d7f8956259824cec980\\setup.py'"'"'; __file__='"'"'C:\\Users\\aymer\\AppData\\Local\\Temp\\pip-install-yxkp7g76
\\pycryptodome_a53664fc52004d7f8956259824cec980\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools impo
rt setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\aymer\AppData\Local\Temp\
pip-record-na3bmx_0\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\documents\python_projects\stable_env\include\site\python3.7\pycryptodome' Check
 the logs for full command output.

如果我尝试pip3 install pycrypto,我有同样的错误。

但是,他们建议我error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

当我尝试安装它时,我的C:. 我不确定我现在可以尝试什么来调试它。

标签: pythonpippycharmpycrypto

解决方案


推荐阅读