conda ValueError:无法解析Cpython sys.version
问题描述:
我想在Windows 7 64位系统上的现有Python环境(32位)上安装Anaconda(32位)。我能得到水蟒蟒环境中运行,但是导航仪不会响应和畅达命令失败,出现错误conda ValueError:无法解析Cpython sys.version
ValueError: failed to parse CPython sys.version
我已删除C:\ Python27; C:\ Python27 \脚本;来自PATH变量,但我必须错过一些东西!
C:\Users\gaurav>python
Python 2.7.13 |Anaconda 4.3.0 (32-bit)| (default, Dec 19 2016, 13:36:02) [MSC v.
1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> quit()
C:\Users\gaurav>conda
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Traceback (most recent call last):
File "C:\Users\gaurav\Anaconda2\Scripts\conda-script.py", line 5, in <module>
sys.exit(conda.cli.main())
File "C:\Users\gaurav\Anaconda2\lib\site-packages\conda\cli\main.py", line 167
, in main
return conda_exception_handler(_main, *args)
File "C:\Users\gaurav\Anaconda2\lib\site-packages\conda\exceptions.py", line 6
33, in conda_exception_handler
print_unexpected_error_message(e)
File "C:\Users\gaurav\Anaconda2\lib\site-packages\conda\exceptions.py", line 5
60, in print_unexpected_error_message
info_stdout, info_stderr = get_info()
File "C:\Users\gaurav\Anaconda2\lib\site-packages\conda\exceptions.py", line 5
30, in get_info
args.func(args, p)
File "C:\Users\gaurav\Anaconda2\lib\site-packages\conda\cli\main_info.py", lin
e 142, in execute
from conda.api import get_index
File "C:\Users\gaurav\Anaconda2\lib\site-packages\conda\api.py", line 1, in <m
odule>
from .core.index import get_index
File "C:\Users\gaurav\Anaconda2\lib\site-packages\conda\core\index.py", line 2
2, in <module>
from .package_cache import PackageCache
File "C:\Users\gaurav\Anaconda2\lib\site-packages\conda\core\package_cache.py"
, line 9, in <module>
from .path_actions import CacheUrlAction, ExtractPackageAction
File "C:\Users\gaurav\Anaconda2\lib\site-packages\conda\core\path_actions.py",
line 32, in <module>
from ..gateways.download import download
File "C:\Users\gaurav\Anaconda2\lib\site-packages\conda\gateways\download.py",
line 15, in <module>
from ..connection import CondaSession
File "C:\Users\gaurav\Anaconda2\lib\site-packages\conda\connection.py", line 5
5, in <module>
python=platform.python_implementation(),
File "C:\Python27\Lib\platform.py", line 1460, in python_implementation
return _sys_version()[0]
File "C:\Python27\Lib\platform.py", line 1422, in _sys_version
repr(sys_version))
ValueError: failed to parse CPython sys.version: '2.7.13 |Anaconda 4.3.0 (32-bit
)| (default, Dec 19 2016, 13:36:02) [MSC v.1500 32 bit (Intel)]'
C:\Users\gaurav>
答
我只更新了系统环境变量PATH,并没有碰到PythonPath,它被设置为C:\ Python27。这是ValueError的原因。我找到了我的解决方案in this stackoverflow answer。