If you wish to run a single command using a Python environment created with conda
(i.e., you don't want to activate
the environment first), you can use the following command:
conda run -n your_env_name some_command
E.g.:
conda run -n webprojects python --version
or:
conda run -n datascience jupyter lab
Make sure that you are using the -n
argument; pipenv
does not require specifying an "optional" argument, hence it took me some time to get this working (i.e., it works just like pipenv run jupyter lab
).
References:
Cover Photo by Thomas Oldenburger on Unsplash
Top comments (0)