conda / conda

A system-level, binary package and environment manager running on all major operating systems and platforms.
https://docs.conda.io/projects/conda/
Other
6.41k stars 1.66k forks source link

Error: 'conda' can only ... doesn't say what is asking for conda #2946

Closed ijstokes closed 8 years ago

ijstokes commented 8 years ago

I'm trying to create a "kitchen sink" environment. I copied the list of everything that we say is available for Python 3.5:

https://docs.continuum.io/anaconda/pkg-docs

I removed anything that wasn't available for Linux, then I removed the obvious "trouble" packages: anaconda, conda, and a few others that I thought might be problematic. I then had a list of 381 packages (~30 removed), and I tried to create an environment with them. No luck:

$ conda create -n ana41py35sink python=3.5 `cat kitchensink.txt` 
Fetching package metadata .......
Solving package specifications: ..........

Error: 'conda' can only be installed into the root environment

I'm happy to remove more packages, but this isn't giving me any good hints as to the source of the problem.

I can't figure out how to proceed. I mean, I could do a divide and conquer on the list to isolate the package(s) causing problem(s), but that seems like a lot of work and might not work.

This isn't me trying to be difficult: we have a client who has asked for "everything", so I'm trying to figure out how to give that to them.

Below are the kitchensink.txt file and also the output of the command when executed with conda --debug.

debug_log.txt kitchensink.txt

$ conda info
Current conda install:

             platform : linux-64
        conda version : 4.1.5
    conda-env version : 2.5.1
  conda-build version : 1.21.3
       python version : 2.7.10.final.0
     requests version : 2.9.1
     root environment : /opt/anaconda  (read only)
  default environment : /opt/anaconda
     envs directories : /home/ijstokes/.conda/envs
                        /home/ijstokes/envs
                        /opt/anaconda/envs
        package cache : /home/ijstokes/.conda/envs/.pkgs
                        /home/ijstokes/envs/.pkgs
                        /opt/anaconda/pkgs
         channel URLs : https://repo.continuum.io/pkgs/free/linux-64/
                        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

Here are the entries that stick out to me (not that I can interpret them):

anaconda-client: pruned from 32 -> 7
conda-env: pruned from 60 -> 4
conda: pruned from 309 -> 31

Associated numbers:

309: no other instances

4:

llvmlite: pruned from 36 -> 4
llvmlite: pruned from 4 -> 3

hdf5: pruned from 9 -> 4
hdf5: pruned from 4 -> 3

gridmap: pruned from 4 -> 1
drmaa: pruned from 4 -> 1
lancet: pruned from 4 -> 1
line_profiler: pruned from 4 -> 1
blaze: pruned from 78 -> 4
wheel: pruned from 16 -> 4
alabaster: pruned from 14 -> 4
babel: pruned from 18 -> 4
click: pruned from 18 -> 4
constructor: pruned from 12 -> 4
coverage: pruned from 14 -> 4
cvxopt: pruned from 15 -> 4
wget: pruned from 4 -> 2
nltk: pruned from 57 -> 4
preshed: pruned from 18 -> 4
notebook: pruned from 7 -> 4
spacy: pruned from 40 -> 4
thinc: pruned from 30 -> 4
spyder: pruned from 42 -> 4
swig: pruned from 5 -> 4
pymc: pruned from 5 -> 4
dynd-python: pruned from 46 -> 4
pyflakes: pruned from 46 -> 4
ipyparallel: pruned from 16 -> 4
pygments: pruned from 25 -> 4
jupyter: pruned from 12 -> 4
jupyter_console: pruned from 16 -> 4
mkl-service: pruned from 21 -> 4

matplotlib: pruned from 5 -> 4
matplotlib: pruned from 4 -> 3

ipywidgets: pruned from 12 -> 4
ipywidgets: pruned from 4 -> 1

netcdf4: pruned from 63 -> 4
netcdf4: pruned from 4 -> 3

libpng: pruned from 5 -> 4
libpng: pruned from 4 -> 2

numba: pruned from 12 -> 4
numba: pruned from 4 -> 3

7:

pytz: pruned from 61 -> 7
qt: pruned from 9 -> 7
bcolz: pruned from 56 -> 7
bcolz: pruned from 7 -> 6
h5py: pruned from 83 -> 7
h5py: pruned from 7 -> 6
pytables: pruned from 62 -> 7
pytables: pruned from 7 -> 2
bsdiff4: pruned from 7 -> 1
fontconfig: pruned from 7 -> 3
csvkit: pruned from 7 -> 2
pandas: pruned from 109 -> 7
pandas: pruned from 7 -> 3
pillow: pruned from 60 -> 7
ephem: pruned from 7 -> 1
zeromq: pruned from 7 -> 2
notebook: pruned from 25 -> 7
notebook: pruned from 7 -> 4
stripe: pruned from 7 -> 1
workerpool: pruned from 7 -> 1
cryptography: pruned from 8 -> 7
libnetcdf: pruned from 7 -> 2
anaconda-client: pruned from 32 -> 7

31:

argcomplete: pruned from 31 -> 3

32:

clyent: pruned from 32 -> 6
glueviz: pruned from 32 -> 6
mcg1969 commented 8 years ago

Ian, I am sorry this is happening to you. I know it's likely to be a big log, but can you send the full debug output?

I have two guesses as to what this could be. One is that one of the packages in your list has a dependency on conda. If that is the case, then we need to include that package in any error messages.

The other is that somehow Conda is fooled into thinking this is a root environment and is adding conda to the spec list because of its auto update functionality. If you would like to test this theory, add auto_update_conda: false to your .condarc and try again.

mcg1969 commented 8 years ago

constructor is the offending package.

mcg1969 commented 8 years ago

How about something like this:

0203-mgrant:conda mgrant$ conda install -n test constructor conda-build
Fetching package metadata .......
Solving package specifications: ..........

Error: the following specs depend on 'conda' and can only be installed
into the root environment: constructor conda-build
kalefranz commented 8 years ago

Resolved by #2956

asmeurer commented 8 years ago

FYI conda search --reverse-dependency conda would have made this easier to find.

mcg1969 commented 8 years ago

Ha ha! I had no idea that existed. And in fact I wrote r.depends_on not knowing that existed.

ijstokes commented 8 years ago

@mcg1969 that is super, thanks so much. And @asmeurer thanks for the tip: that will be super useful. I also had no idea that option existed. It looks like this problem has been "solved" in the PR that provides better error information, but if necessary, I had already attached the full debug log to the original post (but you'll need to look at it in GH: it is linked inline in the middle of the OP, just before the conda info output.

github-actions[bot] commented 2 years ago

Hi there, thank you for your contribution to Conda!

This issue has been automatically locked since it has not had recent activity after it was closed.

Please open a new issue if needed.