Installing conda packages locally in own directory


Step 1: Module load the anaconda module in HPC (if you are using Module Environment)

$ module load anaconda2019/python3

Step 2: Create a virtual environment locally and install packages

$ conda create -y -n my-own-conda-env

You can rename my-own-conda-env with any name. It is good practise to have a “-env” postfix.

Step 2(Option) : Install conda-env in non-default directory

If you wish to install in other directory instead of the default ~/.conda/envs, you have to use the “-p” parameters

$ conda create -y -p ~/my-conda-direct-env

Step 3: Activate the conda environment

$ source activate my-own-conda-env

You should see the environment activated which is prefix the login prompt.

(conda-env) [user1@hpc-n001 ~]$

Step 4: Download and install the conda package

$ conda install -c  ipyrad ipyrad

Step 5: Check for installed package

$ conda list

Step 6: Deactivate environment

$ source deactivate

The command prompt will be revert back without the conda environment

[user1@hpc-n001 ~]$
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.