Python: Difference between revisions

From TRACC Wiki
Jump to navigation Jump to search
No edit summary
Line 13: Line 13:
  module load python/3.3.2
  module load python/3.3.2
  #!/usr/bin/env python2
  #!/usr/bin/env python2
== Phoenix ==
The default version of Python on the Phoenix cluster is 2.3.4, the version which comes with Red Hat 4.5. We also have versions 2.6 and 3.0 installed in /soft/python/bin. To use them, you'll need to either fully specify the path to the version you want to use, or load the appropriate module. The modules alias python to the module version and set LD_LIBRARY_PATH, which helps to eliminate some errors that you may otherwise encounter when you use Python modules.
$ /soft/python/bin/python2.6
$ /soft/python/bin/python3.0
or
module load python/2.6
module load python/3.0
For example,
$ module load python/2.6
$ python
== Python modules ==
We add Python modules (i.e., libraries) as users request them. The non-default site packages are in /soft/python/lib/python<version>/site-packages.
If you encounter any problems with a Python library module, try loading the Python environment module (as above).

Revision as of 18:36, July 1, 2021

Arrow

The default version of Python on Arrow is 2.7.5. and does not require a module to be loaded. You can start the interactive version by entering the command

python2

To run the batch version, start your script with

#!/usr/bin/env python2

The default version of python3 (3.6.8) along with sympy, numpy, and ipython are also installed, but you must load the python libraries. You can use the interactive version by entering the commands

module load python/3.8.2
python3

You can use the batch version by starting your script with

module load python/3.3.2
#!/usr/bin/env python2