DEV Community

Discussion on: Stop using sudo pip install

Collapse
 
ijstokes profile image
Ian Stokes-Rees

Or use conda which solves this problem for Python plus many other languages and arbitrary binaries.

Collapse
 
elabftw profile image
eLabFTW

but conda is not per project, is it?

Collapse
 
rodolfoferro profile image
Rodolfo Ferro

You can create a specific conda environment for each proyect, and even specify the conda channel from which it is installed.

I usually create an environment.yml file for this, so I only run

$ conda env create -f environment.yml

to create the conda env.

After this I only do:

# Activate conda env:
$ conda activate (env-name)

# Deactivate conda env:
$ conda deactivate

(Depending on your Anaconda version, to activate/deactivate the env, you can use source instead of conda.)

Thread Thread
 
elabftw profile image
eLabFTW

Good to know thx.