0

I am trying to use keras in the LXPLUS cluster for CERN users.

For that I am using a CMSSW release that already has python installed, just missing install keras... but...

$ 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)

I know there are many tutorials and solutions to these errors but none has been a clear or direct solution for my case.

  1. PIP VERSION: How to change pip version 7.1.0 to 9.0.1? (In case it is useful for installing keras).

  2. InsecurePlatformWarning: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately (this does not help me solve it because the problem still appears...). Can you help me with this?

  3. raise RuntimeError: Should I apparently use a CMSSW release with python version greater than 2.7?

  4. Python location: To install keras should i run python from what location?

$ 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")
Community
  • 1
  • 1
Junior Higgs
  • 1
  • 1
  • 1
  • 2
  • you can upgrade `pip` with `pip install --upgrade pip` (to install system wide) or `pip install --user --upgrade pip` (to install it just for you). Beware combinations with virtualenv or conda might be desirable on the long run. – pseyfert Mar 16 '17 at 23:41
  • Not using cmssw myself, but are you sure you set up using cmssw correctly? i would suspect cmssw ships its own python through cvmfs, such that after a proper setup, $PATH is set such that `which python` returns some location on /cvmfs – pseyfert Mar 16 '17 at 23:43
  • @pseyfert - Curiously I have python 2.7.11 ($ python --version : Python 2.7.11) and pip 9.0.1 ($ pip --version : pip 9.0.1 from /user_area/.local/lib/python2.6/site-packages (python 2.6)). PIP version warning continues and new problem appears (DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6). How to solve this? – Junior Higgs Mar 17 '17 at 20:19
  • I wanted to correct this title, should be as it is in this link (http://stackoverflow.com/questions/42861163/installing-keras-on-lxplus-with-cmssw-release). Think I configured cmssw correctly ($ cmsrel CMSSW_X_Y_Z, $ cd CMSSW_X_Y_Z/src/, $ cmsenv) and so I have my own python ($ which python : /cvmfs/cms.cern.ch/slc6_amd64_gccABC/cms/cmssw/CMSSW_X_Y_Z/external/slc6_amd64_gccABC/bin/python). I still have the same problems installing KERAS, any help? – Junior Higgs Mar 17 '17 at 20:50

0 Answers0