|
|
Line 1: |
Line 1: |
| <languages /> | | <languages /> |
| [[Category:Software]] | | [[Category:Software]] |
| '''Attention:''' While Conda works well in a desktop environment, it tends to create more problems than it solves on a cluster. We encourage users to instead use virtual environments and the binary packages that we provide through Python wheels as documented on the [[Python]] page. | | <div class="mw-translate-fuzzy"> |
| | '''Attention:''' While Conda works well in a desktop environment, it tends to create more problems than it solves on a cluster. We encourage users to instead use virtual environments and the binary packages that we provide through Python wheels as documented on the [[Python]] page. |
| | </div> |
|
| |
|
| == Description ==
| | Pour ces raisons, on exige que les usagers se tournent vers des outils comme un environnement virtuel ou des paquets binaires (Python wheels), qui sont documentés sur la page [[Python]], ou bien l'usage de [[Singularity]] et une image Docker. |
| | |
| Anaconda is an open source distribution of [[Python]] and [[R]] which aims to simplify the management and deployment of modules.
| |
| | |
| == Installation ==
| |
| | |
| Python distributions installed on Compute Canada servers are compiled from the source available at the [http://www.python.org python.org site]. Users are however free to install Anaconda in their own directory. The following instructions should simplify this job and thus avoid compatibility errors. | |
| | |
| In order to limit the installation time and the amount of storage needed, we encourage the installation of [https://conda.io/miniconda.html Miniconda] instead of Anaconda. Miniconda includes the conda package manager and Python. You can then use the conda command to install the software you need.
| |
| | |
| === Home directory (user-based installation) ===
| |
| | |
| By default the installation is performed in your home directory to which only you have access. If you want to share your installation with other members of your group, use the instructions in the following section.
| |
| | |
| To install Miniconda with Python 2, execute the following command:
| |
| {{Command|eb Miniconda2-4.3.27.eb}}
| |
| | |
| For Miniconda with Python 3, execute the following command:
| |
| {{Command|eb Miniconda3-4.3.27.eb}}
| |
| | |
| '''Be patient, the installation of Miniconda can take several minutes.'''
| |
| | |
| === Project directory (group-based installation) ===
| |
| | |
| To install Anaconda with Python 2, execute the following commands, replacing <code><project></code> by your project identifier:
| |
| {{Command|eb --sticky-bit --set-gid-bit --prefix{{=}}$(readlink ~/projects/<project>) Miniconda2-4.3.27.eb}}
| |
| | |
| For Anaconda with Python 3, execute the following command, replacing <code><project></code> by your group identifier:
| |
| {{Command|eb --sticky-bit --set-gid-bit --prefix{{=}}$(readlink ~/projects/<project>) Miniconda3-4.3.27.eb}}
| |
| | |
| '''Be patient, the installation of Miniconda can take several minutes.'''
| |
| | |
| The installation of Miniconda automatically creates a module file that you can load with the command of the same name. For the module command to find this file, you need to tell it where to look with the following command, replacing <code><project></code> by your project identifier:
| |
| {{Command|module use ~/projects/<project>/modules/*/Core}}
| |
| | |
| If you want this module to be available every time you connect to the cluster, you can add the preceding command to the end of your <code>.bashrc</code> file.
| |
| | |
| === Other versions ===
| |
| | |
| To install any other version of Anaconda, we recommend that you contact [[Technical support|technical support]].
| |
| | |
| == Usage ==
| |
| | |
| Load the Miniconda 2 module with
| |
| {{Command|module load miniconda2}}
| |
| | |
| or the Miniconda 3 module with
| |
| {{Command|module load miniconda3}}
| |
| | |
| === conda ===
| |
| | |
| You can install Python modules in your Miniconda installation by using the command <tt>conda</tt> directly. For example, to install the theano module, use
| |
| {{Command|conda install theano}}
| |