这是我的第一篇文章,所以如果我遗漏任何关键信息或我的格式已关闭,请告知我们。
我在我的电脑上重新安装python,自从我开始使用Enthought Canopy以来,我还没有使用它。我已经卸载了机盖,最近重新安装了python 2.7.10。我尝试使用cmd中的以下内容安装numpy,scipy和一些类似的基于科学的软件包:
pip install numpy
我得到以下追溯:
Traceback (most recent call last):
File "c:\users\chris\appdata\local\enthought\canopy\user\scripts\pip-script.py", line 8, in <module>
from pip import main
File "C:\Python27\lib\site-packages\pip\__init__.py", line 17, in <module>
from pip.commands import get_summaries, get_similar_commands
File "C:\Python27\lib\site-packages\pip\commands\__init__.py", line 6, in <module>
from pip.commands.completion import CompletionCommand
File "C:\Python27\lib\site-packages\pip\commands\completion.py", line 4, in <module>
from pip.basecommand import Command
File "C:\Python27\lib\site-packages\pip\basecommand.py", line 20, in <module>
from pip.req import InstallRequirement, parse_requirements
File "C:\Python27\lib\site-packages\pip\req\__init__.py", line 3, in <module>
from .req_install import InstallRequirement
File "C:\Python27\lib\site-packages\pip\req\req_install.py", line 17, in <module>
from pip._vendor.distlib.markers import interpret as markers_interpret
File "C:\Python27\lib\site-packages\pip\_vendor\__init__.py", line 72, in load_module
__import__(name)
File "C:\Python27\lib\site-packages\pip\_vendor\distlib\markers.py", line 20, in <module>
class Evaluator(object):
File "C:\Python27\lib\site-packages\pip\_vendor\distlib\markers.py", line 48, in Evaluator
'platform_python_implementation': python_implementation(),
File "C:\Python27\Lib\platform.py", line 1498, in python_implementation
return _sys_version()[0]
File "C:\Python27\Lib\platform.py", line 1463, in _sys_version
repr(sys_version))
ValueError: failed to parse CPython sys.version: '2.7.6 |CUSTOM| (default, Jun 4 2014, 16:30:34) [MSC v.1500 64 bit (AMD64)]'
我不确定为什么它告诉我我的版本是2.7.6,或者为什么它说我在AMD64系统上运行(我在x64设备上) 。知道可能会发生什么吗?
我看到了similar problem的帖子,但建议的解析(手动设置sys.version字符串)没有帮助,每当我尝试安装时,它都会重置为上面显示的那个。
再次,任何帮助表示赞赏。干杯!
答案 0 :(得分:1)
我通过计算机找到了旧的Canopy安装程序。一旦我删除了之前安装的python,问题就解决了。