PyCharm ValueError:无法解析 CPython sys.version [英] PyCharm ValueError: failed to parse CPython sys.version
问题描述
当我尝试 pip install 一些软件包时会发生这种情况.
This happens when I try to pip install some packages.
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,我在别处读到这可能会导致问题.有没有办法解决这个问题?
I used to use Enthought Canopy and I read elsewhere this can cause issues. Is there anyway to resolve this?
我将我的解释器切换到 Anaconda,现在似乎也没有加载任何模块.我完全不知所措.我无法使用已安装的任何模块,也无法安装任何新模块.
I switched my interpreter to Anaconda and it seems like none of the modules load now either. I'm totally nonplussed. I can't use any modules I have installed and I can't install any new ones.
按照此处的说明进行操作后,我现在得到了:Praw无法解析 CPython sys.version";创建 Reddit 对象时
After following instructions here, I'm getting this now: Praw "failed to parse CPython sys.version" when creating Reddit object
尽管通过该更改可以正确安装某些东西.
Although some things are installing properly with that change.
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
推荐答案
我建议从头开始重新安装 python 和 pycharm.
I would suggest reinstalling python and pycharm from scratch.
这篇关于PyCharm ValueError:无法解析 CPython sys.version的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!