Python-Sapelo2: Difference between revisions

From Research Computing Center Wiki
Jump to navigation Jump to search
Line 52: Line 52:




'''Example'''
'''Example of using Python3'''


To use Python 2.7.14, you can use the following in the first line of your Python code:
To use Python 3.8.2, you can use the following in the first line of your Python code:


<pre class="gscript">
<pre class="gscript">
#!/usr/local/apps/eb/Python/2.7.14-foss-2016b/bin/python
#!/apps/eb/Python/3.8.2-GCCcore-8.3.0/bin/python3
</pre>
</pre>


Line 67: Line 67:


<pre class="gcommand">
<pre class="gcommand">
module load Python/2.7.14-foss-2016b
module load Python/3.8.2-GCCcore-8.3.0
 
python myProgram.py
</pre>
 
'''Example of using Python2'''
 
To use Python 2.7.16, you can use the following in the first line of your Python code:
 
<pre class="gscript">
#!/apps/eb/Python/2.7.16-GCCcore-8.3.0/bin/python
</pre>
 
Or use the following line in the first line of your Python code:
<pre class="gscript">
#!/usr/bin/env python
</pre>
an then you run your program as:
 
<pre class="gcommand">
module load  Python/2.7.16-GCCcore-8.3.0


python myProgram.py
python myProgram.py

Revision as of 13:58, 28 October 2020

Category

Programming

Program On

Sapelo2

Version

2.7.14, 2.7.15, 2.7.16, 3.7.4, 3.8.2

Author / Distributor

The Python Software Foundation

Description

Python is a programming language.

Running Program

Also refer to Running Jobs on Sapelo

We have a set of pythons installed on Sapelo2:

ml spider Python

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Python:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      Python is a programming language that lets you work more quickly and integrate your systems more effectively.

     Versions:
        Python/2.7.14-GCCcore-6.4.0-bare
        Python/2.7.15-fosscuda-2018b
        Python/2.7.16-GCCcore-8.3.0
        Python/3.7.4-GCCcore-8.3.0
        Python/3.8.2-GCCcore-8.3.0
     Other possible modules matches:
        Biopython  Boost.Python  GitPython  IPython  bx-python  netcdf4-python  openslide-python

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  To find other possible module matches execute:

      $ module -r spider '.*Python.*'

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  For detailed information about a specific "Python" package (including how to load the modules) use the module's full name.
  Note that names that have a trailing (E) are extensions provided by other modules.
  For example:

     $ module spider Python/3.8.2-GCCcore-8.3.0
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Example of using Python3

To use Python 3.8.2, you can use the following in the first line of your Python code:

#!/apps/eb/Python/3.8.2-GCCcore-8.3.0/bin/python3

Or use the following line in the first line of your Python code:

#!/usr/bin/env python

an then you run your program as:

module load Python/3.8.2-GCCcore-8.3.0

python myProgram.py

Example of using Python2

To use Python 2.7.16, you can use the following in the first line of your Python code:

#!/apps/eb/Python/2.7.16-GCCcore-8.3.0/bin/python

Or use the following line in the first line of your Python code:

#!/usr/bin/env python

an then you run your program as:

module load  Python/2.7.16-GCCcore-8.3.0

python myProgram.py

Documentation

Please see http://www.python.org/

Installation

EasyBuild recipes

System

64-bit Linux