Goals: Demonstrate using conda to install a command-line application.
General Process
[]$ cd /project/<project-name>/<username>/ []$ mkdir software []$ cd software []$ pwd /project/<project-name>/<username>/software []$ conda create -p slim_env_4.2.2 ... ## Package Plan ## environment location: /cluster/medbow/project/<project-name>/<username>/software/slim_env_4.2.2 ... # To activate this environment, use # $ conda activate /cluster/medbow/project/<project-name>/<username>/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.
[]$ conda install --help ... -p PATH, --prefix PATH Full path to environment location (i.e. prefix).
[]$ cat ~/.conda/environments.txt /home/<username>/.conda/envs/py_env /project/<project-name>/<username>/conda/envs/r_env /cluster/medbow/project/<project-name>/<username>/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/<project-name>/<username>/software/slim_env_4.2.2 py_env /home/<username>/.conda/envs/py_env r_env /project/<project-name>/<username>/conda/envs/r_env
This environment has no name
and thus you must use the full path to activate.
[]$ conda activate /cluster/medbow/project/<project-name>/<username>/software/slim_env_4.2.2 (/cluster/medbow/project/<project-name>/<username>/software/slim_env_4.2.2) []$
Calling the SLiM command-line
The slim
command is only available from within your activated conda environment.
As soon as you deactivate it, the command is no longer available.
(/cluster/medbow/project/<project-name>/<username>/software/slim_env_4.2.2) []$ conda install slim (/cluster/medbow/project/<project-name>/<username>/software/slim_env_4.2.2) []$ 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/<project-name>/<username>/software/slim_env_4.2.2) []$ which slim /cluster/medbow/project/<project-name>/<username>/software/slim_env_4.2.2/bin/slim (/cluster/medbow/project/<project-name>/<username>/software/slim_env_4.2.2) []$ conda deactivate []$ slim --version bash: slim: command not found...
Prev | Workshop Home | Next |