1

I am trying to install Anaconda (32-bit) over an existing Python environment (32-bit) on a Windows 7 64-bit system. I am able to get Anaconda python environment running, but the navigator won't respond and conda command fails with an error

ValueError: failed to parse CPython sys.version

I have removed C:\Python27; C:\Python27\Scripts; from PATH variable, but I must be missing something!

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>
devautor
  • 2,506
  • 4
  • 21
  • 31

1 Answers1

0

I was only updating the system environment variable PATH, and was not touching PythonPath, which was set to C:\Python27. This was the cause for that ValueError. I found my solution in this stackoverflow answer.

devautor
  • 2,506
  • 4
  • 21
  • 31