2015-05-26 55 views
0

當我嘗試點擊安裝某些軟件包時會發生這種情況。PyCharm ValueError:無法解析CPython sys.version

Exception: 
Traceback (most recent call last): 
    File "C:\Python27\lib\site-packages\pip\basecommand.py", line 122, in main 
    status = self.run(options, args) 
    File "C:\Python27\lib\site-packages\pip\commands\install.py", line 236, in run 
    session = self._build_session(options) 
    File "C:\Python27\lib\site-packages\pip\basecommand.py", line 52, in _build_session 
    session = PipSession() 
    File "C:\Python27\lib\site-packages\pip\download.py", line 216, in __init__ 
    super(PipSession, self).__init__(*args, **kwargs) 
    File "C:\Python27\lib\site-packages\pip\_vendor\requests\sessions.py", line 273, in __init__ 
    self.headers = default_headers() 
    File "C:\Python27\lib\site-packages\pip\_vendor\requests\utils.py", line 555, in default_headers 
    'User-Agent': default_user_agent(), 
    File "C:\Python27\lib\site-packages\pip\_vendor\requests\utils.py", line 524, in default_user_agent 
    _implementation = platform.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)]' 

Storing debug log for failure in C:\Users\kyzcr_000\pip\pip.log 

我曾經使用Enthought Canopy,我在別處讀到這可能會導致問題。無論如何要解決這個問題嗎?

我把我的解釋器切換到Anaconda,好像現在也沒有模塊加載。我完全沒有抱怨。我無法使用已安裝的任何模塊,也無法安裝任何新模塊。

編輯:這下面的說明之後,我現在得到這個:Praw "failed to parse CPython sys.version" when creating Reddit object

雖然有些事情是與變化正確安裝。

Collecting cryptography 
    Using cached cryptography-0.9-cp27-none-win_amd64.whl 
Collecting setuptools (from cryptography) 
    Using cached setuptools-16.0-py2.py3-none-any.whl 
Requirement already up-to-date: enum34 in c:\anaconda\lib\site-packages (from cryptography) 
Requirement already up-to-date: pyasn1 in c:\anaconda\lib\site-packages (from cryptography) 
Requirement already up-to-date: idna in c:\anaconda\lib\site-packages (from cryptography) 
Requirement already up-to-date: ipaddress in c:\anaconda\lib\site-packages (from cryptography) 
Requirement already up-to-date: six>=1.4.1 in c:\anaconda\lib\site-packages (from cryptography) 
Requirement already up-to-date: cffi>=0.8 in c:\anaconda\lib\site-packages (from cryptography) 
Requirement already up-to-date: pycparser in c:\anaconda\lib\site-packages (from cffi>=0.8->cryptography) 
Installing collected packages: setuptools, cryptography 
    Found existing installation: setuptools 14.3 

Cannot remove entries from nonexistent file c:\anaconda\lib\site-packages\easy-install.pth 
+0

什麼是2.7.6 | CUSTOM |?只需卸載Python並通過https://www.python.org/downloads/獲取真實版本 –

回答

1

我會建議從頭重新安裝python和pycharm。