PyCharm ValueError:解析CPython sys.version失败



当我尝试pip安装一些包时,就会发生这种情况。

Exception:
Traceback (most recent call last):
  File "C:Python27libsite-packagespipbasecommand.py", line 122, in main
    status = self.run(options, args)
  File "C:Python27libsite-packagespipcommandsinstall.py", line 236, in run
    session = self._build_session(options)
  File "C:Python27libsite-packagespipbasecommand.py", line 52, in _build_session
    session = PipSession()
  File "C:Python27libsite-packagespipdownload.py", line 216, in __init__
    super(PipSession, self).__init__(*args, **kwargs)
  File "C:Python27libsite-packagespip_vendorrequestssessions.py", line 273, in __init__
    self.headers = default_headers()
  File "C:Python27libsite-packagespip_vendorrequestsutils.py", line 555, in default_headers
    'User-Agent': default_user_agent(),
  File "C:Python27libsite-packagespip_vendorrequestsutils.py", line 524, in default_user_agent
    _implementation = platform.python_implementation()
  File "C:Python27Libplatform.py", line 1498, in python_implementation
    return _sys_version()[0]
  File "C:Python27Libplatform.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:Userskyzcr_000pippip.log

我曾经使用Enthought Canopy,我在其他地方读到这可能会导致问题。有办法解决这个问题吗?

我把我的解释器切换到Anaconda,现在似乎没有一个模块加载了。我完全糊涂了。我不能使用我已经安装的模块,也不能安装任何新的模块。

编辑:在遵循这里的说明之后,我现在得到了这个:Praw "未能解析CPython sys.version"创建Reddit对象

虽然有些东西安装正确的改变。

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:anacondalibsite-packages (from cryptography)
Requirement already up-to-date: pyasn1 in c:anacondalibsite-packages (from cryptography)
Requirement already up-to-date: idna in c:anacondalibsite-packages (from cryptography)
Requirement already up-to-date: ipaddress in c:anacondalibsite-packages (from cryptography)
Requirement already up-to-date: six>=1.4.1 in c:anacondalibsite-packages (from cryptography)
Requirement already up-to-date: cffi>=0.8 in c:anacondalibsite-packages (from cryptography)
Requirement already up-to-date: pycparser in c:anacondalibsite-packages (from cffi>=0.8->cryptography)
Installing collected packages: setuptools, cryptography
  Found existing installation: setuptools 14.3
Cannot remove entries from nonexistent file c:anacondalibsite-packageseasy-install.pth

我建议重新安装python和pycharm

相关内容

  • 没有找到相关文章

最新更新