conda equivalent of pip install --user

杀马特。学长 韩版系。学妹 提交于 2021-01-20 23:28:22

问题


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:

  1. 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.

  1. 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

  1. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!