13

While in a conda environment (source activate), how can I make install into the environment library directories (lib, bin, etc.) and not the system directories?

Note that I do NOT want answers related to conda-build.

merv
  • 67,214
  • 13
  • 180
  • 245
xaav
  • 7,876
  • 9
  • 30
  • 47
  • 3
    With the environment activated, the environment variable `$CONDA_PREFIX` points to the prefix of the environment, e.g., `/home/user/miniconda3/envs/env-name`. From there you can add `lib`, `bin`, etc. – darthbith Dec 16 '17 at 14:02
  • @xaav Did you find a solution to this? – Porcupine Jun 03 '18 at 13:23
  • 2
    You would find the root path to your conda environment (maybe, `$CONDA_PREFIX` from above), then provide it to the `configure` command as mentioned [here](https://stackoverflow.com/a/3239373/1509695) if you're lucky to have the make definition having been originally created in a very standard way by the authors of the project which builds the package you are installing, as mentioned on this link just included. – matanster May 12 '20 at 13:01

1 Answers1

0

Use the -C (change directory) argument to tell make to use a different directory:

make -C $CONDA_PREFIX/lib install

From the manual:

 -C dir, --directory=dir
            Change  to directory dir before reading the makefiles or doing anything else.
Alex Shroyer
  • 3,499
  • 2
  • 28
  • 54