简体   繁体   English

Python 3 Windows 10 pip安装错误

[英]Python 3 windows 10 pip install error

Hi i did a clean install of anconda 3 on windows 10.. but when i run from shell some install command by pip like "pip install pysam" i got that error message: 嗨,我在Windows 10上进行了anconda 3的全新安装。但是当我从shell运行一些pip的安装命令时,例如“ pip install pysam”,我收到了该错误消息:

building 'pysam.libchtslib' extension
error: Unable to find vcvarsall.bat

    ----------------------------------------
Command "C:\Users\rando\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\rando\\AppData\\Local\\Temp\\pip-build-dqrfhm5k\\pysam\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\rando\AppData\Local\Temp\pip-b5ng0_7u-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\rando\AppData\Local\Temp\pip-build-dqrfhm5k\pysam\

I saw many posts about that and i understood that's could be a visual c++ problem.. i reinstalled it and also i installed Microsoft Visual C++ Compiler for Python but the situation isn't changed.. What can I do? 我看到了很多关于此的文章,并且我知道这可能是视觉c ++问题。我重新安装了它,还安装了适用于Python的Microsoft Visual C ++编译器,但情况没有改变。我该怎么办? Thanks for your help! 谢谢你的帮助!

Look at Anaconda Faq . 看看Anaconda常见问题解答 The topic How is CPython compiled? 主题如何编译CPython? tells you which version of VC++ you need. 告诉您所需的VC ++版本。 So install the Visual Studio version for your python version. 因此,请为您的python版本安装Visual Studio版本。

Then you have to find Visual Studio Command Prompt in the startmenu (make sure you use the 64 bit version). 然后,您必须在开始菜单中找到Visual Studio命令提示符 (确保使用64位版本)。 From there you should be able to run vcvarsall.bat and then finally to install the package. 从那里您应该能够运行vcvarsall.bat,然后最终安装该软件包。

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

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