问题
To install to my own directory I can use
pip install --user package
Alternatively I can use
conda install package
How do I ask conda
to install to my home directory since conda does not take a --user
flag?
Installing pip packages to $HOME folder
回答1:
According to the documentation:
--use-local
回答2:
I don't think it's possible. Use virtual environments (conda create
).
回答3:
See -p
option here:
-p PATH, --prefix PATH
Full path to environment prefix.
So to install to, say, local
under your home directory, do:
conda install -p $HOME/local packagename
Note, however, this is not a "clean" install as it adds a bunch of conda-related files.
回答4:
To install conda packages on your own directory you can follow these steps:
- Create a blanck environment
conda create -y -n my-conda-env
Replace the name my-conda-env with any name you want to give the environment.
- Activate the environment
source activate my-conda-env
Don't forget to replace my-conda-env with the name you gave the conda environment from the previous step
- Install your package
conda install -c bioconda epa-ng
And thats it, the package shoul be installed on your own directory
来源:https://stackoverflow.com/questions/51005148/conda-equivalent-of-pip-install-user