ValueError:无法解析CPython sys.version:' 3.5.1 | Anaconda 2.4.1(64位)

时间:2015-12-16 16:13:49

标签: python-3.x anaconda

我遇到了错误,我在Windows7 64位上安装了anaconda。

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

我试图从python35 platform.py文件中更改anaconda的platform.py文件;但它没有用。

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,这就是我修复它的方法:

  • 卸载Python,Anaconda和所有其他与Python相关的库
  • 重新启动计算机
  • 使用您想要的版本和位重新安装Anaconda
  • 重新启动计算机
  • 点击您需要的所有其他库并更新pip

就是这样。由于某些原因,Anaconda不喜欢我的计算机上已经有一个版本的Python,因为它安装了Python以及其他所有内容,所以你不需要单独使用python。