Trouble Cloning root env

0 views
Skip to first unread message

Charles Gagnon

unread,
Jul 1, 2016, 8:18:19 AM7/1/16
to conda - Public
We have been using Anaconda deployments for years on our Linux servers and Windows workstations. Just recently, as complexity increases, we decided to leverage virtual environments more for various particular needs. I just recently ran into an issue on a system cloning the root environment in the user space.

My install was done with Anaconda2-4.0.0 and the root environment is pretty vanilla. As a user, I tried cloning the root environment with:

$ source /usr/anaconda/bin/activate root
$ conda create -n q1_tf --clone root
[...]

This worked fine, no errors reported but my environment is using the system python instead of the Anaconda one and nothing is working:

(q1_tf) (cgagnon@hcq1pl7): ~$ which python
~/.conda/envs/q1_tf/bin/python
(q1_tf) (cgagnon@hcq1pl7): ~$ python -V
Python 2.7.5

Of course, nothing I need imports properly. The Python version reported by 'conda info' does not even match. I'm very confused, what am I missing?

$ conda info
Current conda install:

             platform : linux-64
        conda version : 4.1.5
    conda-env version : 2.5.1
  conda-build version : 1.20.0
       python version : 2.7.11.final.0
     requests version : 2.9.1
     root environment : /usr/anaconda  (read only)
  default environment : /home/cgagnon/.conda/envs/q1_tf
     envs directories : /home/cgagnon/.conda/envs
                        /home/cgagnon/envs
                        /usr/anaconda/envs
        package cache : /home/cgagnon/.conda/envs/.pkgs
                        /home/cgagnon/envs/.pkgs
                        /usr/anaconda/pkgs
                        https://repo.continuum.io/pkgs/free/noarch/
                        https://repo.continuum.io/pkgs/pro/linux-64/
                        https://repo.continuum.io/pkgs/pro/noarch/
          config file : None
         offline mode : False
    is foreign system : False

Tim Butler

unread,
Jul 1, 2016, 6:14:56 PM7/1/16
to conda - Public

You might run conda with the --debug option.
In my case, debug shows numerous errors attempting to create
hard links to the /usr/anaconda files that I don't have permission to hard link to.
This includes :

ERROR:conda.install:failed to link (src='/opt/anaconda/pkgs/openssl-1.0.2g-0/bin/.openssl-libcrypto-fix', dst='/home/username/.conda/envs/q3_ft/bin/.openssl-libcrypto-fix', type=1, error=OSError(1, 'Operation not permitted'))
E
...
and the python2.7 binary itself:
DEBUG:conda.install:pkgs_dir='/opt/anaconda/pkgs', prefix='/home/PRLSS/tbutler/.conda/envs/q3_ft', dist=u'python-2.7.12-0', linktype=1
ERROR:conda.install:failed to link (src='/opt/anaconda/pkgs/python-2.7.12-0/bin/python2.7', dst='/home/PRLSS/tbutler/.conda/envs/q3_ft/bin/python2.7', type=1, error=OSError(1, 'Operation not permitted'))

Because python2.7 didn't get installed your which command reverts to the system python.

But I don't understand how you activated your new environment,
because I don't get a bin/activate file in mine.

-tim





Kale

unread,
Jul 13, 2016, 11:04:00 AM7/13/16
to conda - Public
Can you try cloning root to a new env *without* an env being active?  That is, is there a difference in behavior when you try cloning root when an environment is active, and when no conda environment is active?
Reply all
Reply to author
Forward
0 new messages