User Tools

Site Tools


python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
python [2017/04/21 15:49]
root
python [2017/06/07 21:40]
root
Line 1: Line 1:
- ==== Python Versions ====+  ​==== Python Versions ====
 AHPCC maintains Python versionsf rom source 2.7.5, 2.7.11, and 3.5.2. 2.7.11 is most used. AHPCC maintains Python versionsf rom source 2.7.5, 2.7.11, and 3.5.2. 2.7.11 is most used.
 [[https://​www.continuum.io/?​|Anaconda Python]] 2.7.13 is installed on razor. [[https://​www.continuum.io/?​|Anaconda Python]] 2.7.13 is installed on razor.
-[[https://​software.intel.com/​en-us/​intel-distribution-for-python|Intel Python]] is being tested.+[[https://​software.intel.com/​en-us/​intel-distribution-for-python|Intel Python]] ​2.7.13 ​is installed on razor.
  
 "​python"​ at the prompt (with no python enviroment modules loaded) defaults to /​usr/​bin/​python,​ which is the centos rpm installation of Python 2.6 with very few Python modules (installable code used with "​import"​ from Python source). ​ Use environment modules ("​module"​ command from Linux) to load the compiled version of Python 2.7 or Python 3.  Please contact hpc-support to request install/​upgrade of Python modules, or you can install a private library with PYTHONUSERBASE,​ virtualenv, or anaconda (see below). You can also install a full version of Python in your user space, but it is quite large and takes a long time to compile. "​python"​ at the prompt (with no python enviroment modules loaded) defaults to /​usr/​bin/​python,​ which is the centos rpm installation of Python 2.6 with very few Python modules (installable code used with "​import"​ from Python source). ​ Use environment modules ("​module"​ command from Linux) to load the compiled version of Python 2.7 or Python 3.  Please contact hpc-support to request install/​upgrade of Python modules, or you can install a private library with PYTHONUSERBASE,​ virtualenv, or anaconda (see below). You can also install a full version of Python in your user space, but it is quite large and takes a long time to compile.
Line 298: Line 298:
 </​code>​ </​code>​
  
-==Anaconda Python== 
-see [[https://​conda.io/​docs/​using/​cheatsheet.html]] 
-<​code>​ 
-$ module load python/​2.7.13-anaconda 
-$ python -V 
-Python 2.7.13 :: Anaconda 4.3.1 (64-bit) 
-$ conda list 
-# packages in environment at /​share/​apps/​python/​Anaconda2:​ 
-# 
-_license ​                 1.1                      py27_1  ​ 
-alabaster ​                ​0.7.9 ​                   py27_0  ​ 
-anaconda ​                 4.3.1               ​np111py27_0  ​ 
-etc. 
-$ conda create --prefix ~/bio-env biopython 
-Fetching package metadata ......... 
-Solving package specifications:​ . 
  
-Package plan for installation in environment /​home/​rfeynman/​bio-env:​ 
- 
-The following NEW packages will be INSTALLED: 
- 
-    biopython: ​ 1.68-np112py27_0 
-    mkl:        2017.0.1-0 ​     ​ 
-    numpy: ​     1.12.1-py27_0 ​   
-    openssl: ​   1.0.2k-1 ​       ​ 
-    pip:        9.0.1-py27_1 ​   ​ 
-    python: ​    ​2.7.13-0 ​       ​ 
-    readline: ​  ​6.2-2 ​           
-    setuptools: 27.2.0-py27_0 ​   
-    sqlite: ​    ​3.13.0-0 ​       ​ 
-    tk:         ​8.5.18-0 ​       ​ 
-    wheel: ​     0.29.0-py27_0 ​   
-    zlib:       ​1.2.8-3 ​         
- 
-Proceed ([y]/n)? y 
- 
-...etc... 
-$ source activate /​home/​rfeynman/​bio-env 
-</​code>​ 
  
 ==PYTHONUSERBASE== ==PYTHONUSERBASE==
Line 364: Line 326:
 peppercorn (0.5) peppercorn (0.5)
 </​code>​ </​code>​
 +
  
 ==virtualenv== ==virtualenv==
Line 388: Line 351:
 six (1.10.0) six (1.10.0)
 wheel (0.29.0) wheel (0.29.0)
 +</​code>​
 +
 +==Anaconda Python==
 +Anaconda is a prepackaged distribution of Python. Private installations can be made through conda environments similar to virtualenv environments. ​  ​Anaconda and Intel python can also use pip --user, but all python2.7 versions will install to the same user directory /​home/​$USER/​python2.7 . 
 +
 +see [[https://​conda.io/​docs/​using/​cheatsheet.html]]
 +<​code>​
 +$ module load python/​2.7.13-anaconda (or python/​3.6.0-anaconda )
 +$ python -V
 +Python 2.7.13 :: Anaconda 4.3.1 (64-bit)
 +$ conda list
 +# packages in environment at /​share/​apps/​python/​Anaconda2:​
 +#
 +_license ​                 1.1                      py27_1  ​
 +alabaster ​                ​0.7.9 ​                   py27_0  ​
 +anaconda ​                 4.3.1               ​np111py27_0  ​
 +etc.
 +$ conda create --prefix ~/bio-env biopython
 +Fetching package metadata .........
 +Solving package specifications:​ .
 +
 +Package plan for installation in environment /​home/​rfeynman/​bio-env:​
 +
 +The following NEW packages will be INSTALLED:
 +
 +    biopython: ​ 1.68-np112py27_0
 +    mkl:        2017.0.1-0 ​     ​
 +    numpy: ​     1.12.1-py27_0 ​  
 +    openssl: ​   1.0.2k-1 ​       ​
 +    pip:        9.0.1-py27_1 ​   ​
 +    python: ​    ​2.7.13-0 ​       ​
 +    readline: ​  ​6.2-2 ​          
 +    setuptools: 27.2.0-py27_0 ​  
 +    sqlite: ​    ​3.13.0-0 ​       ​
 +    tk:         ​8.5.18-0 ​       ​
 +    wheel: ​     0.29.0-py27_0 ​  
 +    zlib:       ​1.2.8-3 ​        
 +
 +Proceed ([y]/n)? y
 +
 +...etc...
 +$ source activate /​home/​rfeynman/​bio-env
 +</​code>​
 +
 +==Intel Python==
 +Intel supplies another version of Anaconda python, supposedly optimized for runtime speed on Intel processors. It has about 130 conda modules installed.
 +<​code>​
 +$ module load python/​2.7.13-intel
 +$ source activate root
 +(root) $ conda list
 +# packages in environment at /​share/​apps/​intelpython2:​
 +#
 +backports ​                ​1.0 ​               py27_intel_6 ​ [intel] ​ intel
 +backports_abc ​            ​0.5 ​               py27_intel_0 ​ [intel] ​ intel
 +bleach ​                   1.5.0              py27_intel_0 ​ [intel] ​ intel
 +boost                     ​1.61.0 ​            ​py27_intel_3 ​ [intel] ​ intel
 +bzip2                     ​1.0.6 ​                 intel_10 ​ [intel] ​ intel
 +caffe                     ​1.0.0rc3 ​          ​py27_intel_4 ​ [intel] ​ intel
 +etc.
 </​code>​ </​code>​
  
python.txt · Last modified: 2017/06/07 21:40 by root