Difference between revisions of "Software:python"
Line 1: | Line 1: | ||
− | == | + | == Python(Under Construction) == |
{| style="border-spacing: 8px;" | {| style="border-spacing: 8px;" | ||
| valign="top" width="50%" style="padding:1em; border:1px solid #aaaaaa; background-color:#e1eaf1; border-radius:7px" | | | valign="top" width="50%" style="padding:1em; border:1px solid #aaaaaa; background-color:#e1eaf1; border-radius:7px" | | ||
− | + | * '''Default Version''': 3.5.4 | |
− | * ''' | + | * '''Latest Version''' : 3.8.2 |
− | + | ||
− | + | ||
− | * ''' | + | |
|} | |} | ||
− | + | Python is an interpreted, interactive, object-oriented programming language and was first published in 1991. Python design philosophy emphasized on readability of the code and easy-to-use syntax. The programming language comes with a standard library along with an extensive list of third-party packages, and is in part responsible for its popularity. On Frontenac cluster, python is available as a module. You can load the default version of the Python using module load command. | |
− | + | <pre> | |
− | + | $ module load python | |
− | + | </pre> | |
+ | Often you are required to load a specific version of python. Use the following command to load a specific version of python, say 3.7.4: | ||
+ | <pre> | ||
+ | $ module load python/3.7.4 | ||
+ | </pre> | ||
+ | All the available version of python on Frontenac cluster can be list using ‘module avail’ command, this list will include both python/2.x and /3.x versions. | ||
+ | <pre> | ||
+ | $ module avail python | ||
+ | </pre> | ||
+ | |||
+ | Some commonly used python packages are available through scipy-stack environment modules. This includes: ''Numpy, Scipy, Matplotlib,IPython, pandas, Sympy'' and ''nose''. Similar to the python modules, different versions of the Scipy modules are available. The latest version of the Scipy-stack(scipy-stack/2019a) can be loaded with the following command: | ||
+ | |||
+ | <pre> | ||
+ | $ module load scipy-stack | ||
+ | </pre> | ||
+ | == Installation of python packages using virtualenv == | ||
+ | |||
+ | Often, you might require additional packages other than the ones available in scipy-stack. Given the diverse user requirements, it is not practical to install all the necessary packages in a central stack. Python modules on our cluster comes with a virtualenv tool to install and manage packages necessary for your project. Typically, we recommend creating virtual environment in your $HOME directory. ALternatively, you can also install it in $PROJECT directory to make it available for other members of your group. As an example, the following steps shows the installation of biopython package in your $HOME/.local directory using virtualenv. |
Revision as of 19:06, 19 October 2021
Python(Under Construction)
|
Python is an interpreted, interactive, object-oriented programming language and was first published in 1991. Python design philosophy emphasized on readability of the code and easy-to-use syntax. The programming language comes with a standard library along with an extensive list of third-party packages, and is in part responsible for its popularity. On Frontenac cluster, python is available as a module. You can load the default version of the Python using module load command.
$ module load python
Often you are required to load a specific version of python. Use the following command to load a specific version of python, say 3.7.4:
$ module load python/3.7.4
All the available version of python on Frontenac cluster can be list using ‘module avail’ command, this list will include both python/2.x and /3.x versions.
$ module avail python
Some commonly used python packages are available through scipy-stack environment modules. This includes: Numpy, Scipy, Matplotlib,IPython, pandas, Sympy and nose. Similar to the python modules, different versions of the Scipy modules are available. The latest version of the Scipy-stack(scipy-stack/2019a) can be loaded with the following command:
$ module load scipy-stack
Installation of python packages using virtualenv
Often, you might require additional packages other than the ones available in scipy-stack. Given the diverse user requirements, it is not practical to install all the necessary packages in a central stack. Python modules on our cluster comes with a virtualenv tool to install and manage packages necessary for your project. Typically, we recommend creating virtual environment in your $HOME directory. ALternatively, you can also install it in $PROJECT directory to make it available for other members of your group. As an example, the following steps shows the installation of biopython package in your $HOME/.local directory using virtualenv.