2017-03-04 230 views
0

我想在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> 

回答

0

我只更新了系統環境變量PATH,並沒有碰到PythonPath,它被設置爲C:\ Python27。這是ValueError的原因。我找到了我的解決方案in this stackoverflow answer