mbpaulus
mbpaulus

Reputation: 7691

"Installing From Source" Within Anaconda Environment

What I would like to do:

What I have done:

First, I created the environment as follows

conda create --name my_env python=3.5

Now, the instructions for installing PyTorch from source are as follows:

export CMAKE_PREFIX_PATH=[anaconda root directory]
conda install numpy pyyaml setuptools cmake cffi
git clone --recursive https://github.com/pytorch/pytorch
MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install

Now, my questions are:

  1. Following this instructions, requires me to specify anaconda root directory for the CMAKE_PREFIX_PATH. What should that directory be given that I want everything set-up in my_env?
  2. Is it reasonable to create an extra environment for a package installed from source and its dependencies? Why would one do or not do it? My motivation is mainly fear that one day I may screw my system up big time and hence want things to be cleanly separated.

If you can only answer one of the two questions, that is already greatly appreciated. Thanks!

Upvotes: 7

Views: 2099

Answers (1)

mbpaulus
mbpaulus

Reputation: 7691

I received this answer from the Anaconda Google discussion group and re-post it here in case anyone else is interested.

  1. It is the path to my_env. If you created it with -n my_env and you haven't otherwise changed your envs dir, it'll be in <anaconda root>/envs/my_env

  2. Yes, this is definitely good practice. The cleanest way to use conda is to install miniconda, not anaconda, and to install as little as possible into the root environment.

Upvotes: 6

Related Questions