简体   繁体   English

无法在 python 3.6 上安装 Mist 或 pycrypto

[英]Can't install mist or pycrypto on python 3.6

Whenever I try to run pip install mist , it shows me this error.每当我尝试运行pip install mis 时,它都会向我显示此错误。

ERROR: Failed building wheel for pycrypto错误:pycrypto 的构建轮失败
Running setup.py clean for pycrypto Failed to build pycrypto Installing collected packages: pycrypto, ansible, mist Running setup.py install for pycrypto ... error ERROR: Command errored out with exit status 1: command: 'c:\\users\\utshab kumar ghosh\\appdata\\local\\programs\\python\\python36\\python.exe' -u -c 'import sys, setuptools, tokenize;为 pycrypto 运行 setup.py clean 无法构建 pycrypto 安装收集的包:pycrypto、ansible、mist 为 pycrypto 运行 setup.py install ... 错误错误:命令出错,退出状态 1:命令:'c:\\users\\utshab kumar ghosh\\appdata\\local\\programs\\python\\python36\\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\UTSHAB~1\\AppData\\Local\\Temp\\pip-install-c048vl5n\\pycrypto\\setup.py'"'"'; sys.argv[0] = '"'"'C:\\Users\\UTSHAB~1\\AppData\\Local\\Temp\\pip-install-c048vl5n\\pycrypto\\setup.py'"'"'; file ='"'"'C:\\Users\\UTSHAB~1\\AppData\\Local\\Temp\\pip-install-c048vl5n\\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\\UTSHAB~1\\AppData\\Local\\Temp\\pip-record-m3uevb6g\\install-record.txt' --single-version-externally-managed --compile cwd: C:\\Users\\UTSHAB~1\\AppData\\Local\\Temp\\pip-install-c048vl5n\\pycrypto\\ file ='"'"'C:\\Users\\UTSHAB~1\\AppData\\Local\\Temp\\pip-install-c048vl5n\\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\\UTSHAB~1\\AppData\\Local\\Temp\\ pip-record-m3uevb6g\\install-record.txt' --single-version-externally-managed --compile cwd: C:\\Users\\UTSHAB~1\\AppData\\Local\\Temp\\pip-install-c048vl5n\\pycrypto\\

How can I solve this problem?我怎么解决这个问题? I don't want to downgrade to Python 3.5.我不想降级到 Python 3.5。

TL;DR TL; 博士

Possible duplication of this and this . 这个这个可能重复。

Full Read完整阅读

I know this is probably solved by @Utshab but I recently had the same issue albeit in a slightly different scenario.我知道这可能是由@Utshab解决的,但我最近遇到了同样的问题,尽管情况略有不同。

My problem was on Mac OS Catalina (unclear as to what's the environment of the question giver) and with python 2.7 and not python 3.6 .我的问题是在 Mac OS Catalina(不清楚提问者的环境是什么)和python 2.7而不是python 3.6

According to this answer you need to install xcode-select which are command line tools for Mac OS.根据此答案,您需要安装xcode-select ,它们是 Mac OS 的命令行工具。

Some people might have Xcode installed via the App Store, and can install the command line tools through the App Store.有些人可能通过 App Store 安装了 Xcode,并且可以通过 App Store 安装命令行工具。

Users who don't have Xcode, or don't want to install it via the App Store can use the command xcode-select --install to install it.没有 Xcode,或者不想通过 App Store 安装的用户可以使用命令xcode-select --install来安装它。

It's possible for command lines tools to be installed but the tools themselves (eg gcc) will still not work.可以安装命令行工具,但工具本身(例如 gcc)仍然无法工作。 This sometime happens because though installed, the location of the installation is not recognized by the OS.有时会发生这种情况,因为虽然已安装,但操作系统无法识别安装位置。 To check things have been installed correctly you can try to run gcc --version and see if the install location is similar to /Library/Developer/CommandLineTools .要检查是否已正确安装,您可以尝试运行gcc --version并查看安装位置是否类似于/Library/Developer/CommandLineTools

If you get an error about this gcc not being found you might need to point it to the right location so it will identify your command line tools installation:如果您收到有关未找到此gcc的错误,您可能需要将其指向正确的位置,以便识别您的命令行工具安装:

  1. Make sure /Library/Developer/CommandLineTools exists and has content in it.确保/Library/Developer/CommandLineTools存在并且其中包含内容。
  2. Run xcode-select --switch /Library/Developer/CommandLineTools .运行xcode-select --switch /Library/Developer/CommandLineTools

After I did these steps I was able to install pycrypto using pip install pycrypto我做了这些步骤后,我能够安装pycrypto使用pip install pycrypto

Hopes this helps.希望这会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM