Goals: Demonstrate using conda to install a command-line application.
General Process
[salexan5@mblog1 ~]$ cd /project/arcc/salexan5/ [salexan5@mblog1 salexan5]$ mkdir software [salexan5@mblog1 salexan5]$ cd software [salexan5@mblog1 software]$ pwd /project/arcc/salexan5/software [salexan5@mblog1 software]$ conda create -p slim_env_4.2.2 ... ## Package Plan ## environment location: /cluster/medbow/project/arcc/salexan5/software/slim_env_4.2.2 ... # To activate this environment, use # $ conda activate /cluster/medbow/project/arcc/salexan5/software/slim_env_4.2.2
Notice we haven’t performed any activate or install steps.
What do we notice about the installation location?
Create SLiM Environment
conda create -p ...
Using the -p
option will create the environment in your current working folder.
[salexan5@mblog2 ~]$ conda install --help ... -p PATH, --prefix PATH Full path to environment location (i.e. prefix).
[salexan5@mblog2 ~]$ cat ~/.conda/environments.txt /home/salexan5/.conda/envs/py_env /project/arcc/salexan5/conda/envs/r_env /cluster/medbow/project/arcc/salexan5/software/slim_env_4.2.2
Use / Activate this Environment
[salexan5@mblog2 ~]$ conda activate slim_env_4.2.2 EnvironmentNameNotFound: Could not find conda environment: slim_env_4.2.2 You can list all discoverable environments with `conda info --envs`.
[salexan5@mblog2 ~]$ conda info --envs # conda environments: # base /apps/u/opt/linux/miniconda3/24.3.0 /cluster/medbow/project/arcc/salexan5/software/slim_env_4.2.2 py_env /home/salexan5/.conda/envs/py_env r_env /project/arcc/salexan5/conda/envs/r_env
This environment has not ‘name’ and thus you must use the full path to activate.
[salexan5@mblog2 ~]$ conda activate /cluster/medbow/project/arcc/salexan5/software/slim_env_4.2.2 (/cluster/medbow/project/arcc/salexan5/software/slim_env_4.2.2) [salexan5@mblog2 ~]$
Calling the SLiM command-line
(/cluster/medbow/project/arcc/salexan5/software/slim_env_4.2.2) [salexan5@mblog2 ~]$ slim --version SLiM version 4.2.2, built May 5 2024 12:39:53 Git commit SHA-1: unknown (built from a non-Git source archive) (/cluster/medbow/project/arcc/salexan5/software/slim_env_4.2.2) [salexan5@mblog2 ~]$ which slim /cluster/medbow/project/arcc/salexan5/software/slim_env_4.2.2/bin/slim (/cluster/medbow/project/arcc/salexan5/software/slim_env_4.2.2) [salexan5@mblog2 ~]$ conda deactivate [salexan5@mblog2 ~]$ slim --version bash: slim: command not found...
Prev | Workshop Home | Next |