2

I'm running into an error, I have installed anaconda on Windows7 64 bit.

Traceback (most recent call last):
  File "C:\Sanoop\Vayaktigat\Python\phard\ana2\src\ana2.py", line 1, in <module>
    import pandas
  File "C:\Anaconda3\lib\site-packages\pandas\__init__.py", line 42, in <module>
    import pandas.core.config_init
  File "C:\Anaconda3\lib\site-packages\pandas\core\config_init.py", line 17, in <module>
    from pandas.core.format import detect_console_encoding
  File "C:\Anaconda3\lib\site-packages\pandas\core\format.py", line 10, in <module>
    from pandas.core.index import Index, MultiIndex, _ensure_index
  File "C:\Anaconda3\lib\site-packages\pandas\core\index.py", line 31, in <module>
    from pandas.io.common import PerformanceWarning
  File "C:\Anaconda3\lib\site-packages\pandas\io\common.py", line 68, in <module>
    from boto.s3 import key
  File "C:\Anaconda3\lib\site-packages\boto\__init__.py", line 49, in <module>
    platform.python_version(),
  File "C:\Python35\Lib\platform.py", line 1299, in python_version
    return _sys_version()[1]
  File "C:\Python35\Lib\platform.py", line 1252, in _sys_version
    repr(sys_version))
ValueError: failed to parse CPython sys.version: '3.5.1 |Anaconda 2.4.1 (64-bit)| (default, Dec  7 2015, 15:00:12) [MSC v.1900 64 bit (AMD64)]'

Python --version:

Python 3.5.1 :: Anaconda 2.4.1 (64-bit)

PS C:\Users\PVJD6386> conda info
Current conda install:

             platform : win-64
        conda version : 3.18.9
  conda-build version : 1.18.2
       python version : 3.5.1.final.0
     requests version : 2.9.0
     root environment : C:\Anaconda3  (writable)
  default environment : C:\Anaconda3
     envs directories : C:\Anaconda3\envs
        package cache : C:\Anaconda3\pkgs
         channel URLs : https://repo.continuum.io/pkgs/free/win-64/
                        https://repo.continuum.io/pkgs/free/noarch/
                        https://repo.continuum.io/pkgs/pro/win-64/
                        https://repo.continuum.io/pkgs/pro/noarch/
          config file : None
    is foreign system : False

I have tried to change platform.py file of anaconda from python35 platform.py file; but it did not worked.

major
  • 51
  • 5
  • Possible duplicate of [ValueError: failed to parse CPython sys.version after using conda command](http://stackoverflow.com/questions/34145861/valueerror-failed-to-parse-cpython-sys-version-after-using-conda-command) – Ignacio Vazquez-Abrams Dec 16 '15 at 16:31
  • Duplicate case is on Linux machine with same issue. – major Dec 16 '15 at 16:54
  • What fixed this for me on Windows 10 is to re-install pip using this SO answer: http://stackoverflow.com/a/12476379/863923 – Hamman Samuel Jun 29 '16 at 21:42

1 Answers1

0

I had the same problem and this was how I fixed it:

  • Uninstall Python, Anaconda and all other Libraries associated with Python
  • Restart Computer
  • Reinstall Anaconda with the version and bit you want
  • Restart Computer
  • Pip all the other libraries you need and update pip

That's it. For some reason Anaconda didn't like that there was already a version of Python on my computer and since it installs Python along with everything else, you don't need python separately.

Aaron Hellman
  • 1,281
  • 2
  • 11
  • 16