RuntimeError:需要Python版本2.7或> = 3.4

时间:2017-03-16 21:16:12

标签: python-2.7

我正在尝试在LXPLUS集群中为CERN用户使用keras。

为此,我使用已经安装了python的CMSSW版本,只缺少安装keras ...但是......

$ python --version
Python 2.7...
$ pip install keras
You are using pip version 7.1.0, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting keras
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading Keras-2.0.1.tar.gz (192kB)
    100% |################################| 192kB 847kB/s 
Collecting theano (from keras)
  Using cached Theano-0.8.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): pyyaml in /cvmfs/cms.cern.ch/slc6_amd64_gcc493/external/py2-PyYAML/3.11/lib/python2.7/site-packages (from keras)
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2.6/site-packages (from keras)
Collecting numpy>=1.7.1 (from theano->keras)
  Using cached numpy-1.12.0.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/user_number/pip-build-7YA1PY/numpy/setup.py", line 34, in <module>
        raise RuntimeError("Python version 2.7 or >= 3.4 required.")
    RuntimeError: Python version 2.7 or >= 3.4 required.
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/user_number/pip-build-7YA1PY/numpy
$ pip --version
pip 7.1.0 from /usr/lib/python2.6/site-packages (python 2.6)

我知道有很多这些错误的教程和解决方案,但没有一个是我的案例的明确或直接的解决方案。

  1. PIP VERSION:如何将pip版本7.1.0更改为9.0.1? (如果它对安装keras很有用)。

  2. InsecurePlatformWarningInsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately(这无助于我解决问题,因为问题仍然存在......)。你能帮我解决这个问题吗?

  3. raise RuntimeError:我是否应该使用python版本大于2.7的CMSSW版本?

  4. Python位置:要安装keras我应该从哪个位置运行python?

  5. $ which python
    /usr/bin/python
    or
    /cvmfs/cms.cern.ch/slc6_amd64_gcc493/cms/cmssw/CMSSW_X_Y_Z/external/slc6_amd64_gcc493/bin/python (with "cmsenv")

0 个答案:

没有答案