5

I'm running Ubuntu 16.04 with Anaconda 4.1.1 (64-bit) installed.

I'm using a shared machine, and I'm trying to create a few different Conda environments that serve as a "base" environment that can then be cloned by the other users on the machine to their local environments.

To do this, I have anaconda installed at: /usr/share/anaconda2/

For my test user my .condarc file looks like:

envs_dirs: - /home/user1/.conda/envs - /usr/share/anaconda2/envs

I created a conda environment using: conda create --name test_base python=2 numpy scipy

Then, using sudo, I copied /test_base from /home/user1/.conda/envs/ to /usr/share/anaconda2/envs/. Running conda info --envs finds the original and copied environments, so I delete the copy in the user folder. I am then able to source activate test_base and running python gives the standard Anaconda heading with the correct version of python. This is what I would expect.

Now when I do conda create --name test --clone test_base I now have an env called test in /home/user1/.conda/envs/. However, running python after activating this environment runs what I believe is the system python. The header says nothing about being anaconda.

To make certain my copying of the environment to /usr/share/anaconda2/ didn't cause the issue, I get the same thing if I just create a base environment in the home directory, then clone it from there.

Also when running python --version in root I get: Python 2.7.12 :: Anaconda 4.1.1 (64-bit), in the test_base environment I get: Python 2.7.12 :: Continuum Analytics, Inc., and in the cloned environment (test) I only get: Python 2.7.12

Any ideas on why cloning a conda environment is loosing information contained in the original environment? How can I prevent this so the cloned environment actually behaves the same as the original "base" environment?

Edit: This problem does not exist when I installed Anaconda directly to ~/anaconda2 and tried the same process from there. I know I'm not doing anything wrong steps-wise. Ultimately, I can just create steps for every user on the machine to individually install Anaconda and create the "base" environment for themselves. However, I'm curious to know why this problem existed from a shared install of Anaconda in /usr/share/anaconda2/

Kyle
  • 126
  • 1
  • 8

0 Answers0