简体   繁体   English

使用pip或easy_install将软件包安装到winpython时的ValueError

[英]ValueError when using pip or easy_install to install a package into winpython

Currently doing a science course and using python to do calculations and plotting. 目前正在做科学课程并使用python进行计算和绘图。 The Uni uses winpython 2.7.5.3 This is the version I've installed as it has all the standard packages I need. Uni使用winpython 2.7.5.3这是我安装的版本,因为它有我需要的所有标准软件包。 I'm using windows 7 64bit 我正在使用Windows 7 64位

However my course has started diverging and I need to install additional packages, specifically Astropy. 但是我的课程开始出现分歧,我需要安装额外的软件包,特别是Astropy。

Initially I had a vcvarsall.bat error, this was fixed by installing Visual C++ 2008 express. 最初我有一个vcvarsall.bat错误,这是通过安装Visual C ++ 2008 express修复的。

After this both the included version 1.4.1 of pip and easy_install-2.7 find the correct packages but on installing give me an error: 在此之后,包含的1.4.1版本的pip和easy_install-2.7都找到了正确的软件包但是在安装时给出了一个错误:

File "C:\\WinPython\\python-2.7.5.amd64\\lib\\distutils\\msvc9compiler.py", line 29 9, in query_vcvarsall 在query_vcvarsall中的文件“C:\\ WinPython \\ python-2.7.5.amd64 \\ lib \\ distutils \\ msvc9compiler.py”,第29行9

 raise ValueError(str(list(result.keys()))) 

ValueError: [u'path'] ValueError:[u'path']

I am unfortunately stuck at this point. 不幸的是,我被困在这一点上。 This is the first of a few packages I need to install, hopefully this is a single error I can fix for all of them 这是我需要安装的一些软件包中的第一个,希望这是我可以为所有软件包修复的一个错误

Any suggestions would be appreciated. 任何建议,将不胜感激。

I'm not too familiar with Windows, but I would suggest trying to use a Python distribution such as Anaconda Python Distribution or Enthought Canopy which should both have Windows versions, and include a whole bunch of packages by default (including Numpy, Scipy, IPython, Matplotlib, and Astropy). 我不太熟悉Windows,但我建议尝试使用像Anaconda Python DistributionEnthought Canopy这样的Python发行版,它们都应该有Windows版本,默认包含一大堆包(包括Numpy,Scipy,IPython) ,Matplotlib和Astropy)。 The first is free, while the second has free licenses for students and academics. 第一个是免费的,而第二个是学生和学者的免费许可证。

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

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