conda-forge / cupy-feedstock

A conda-smithy repository for cupy.
BSD 3-Clause "New" or "Revised" License
5 stars 23 forks source link

Invalid spec: =1.2.2.5 error when trying to install cupy from conda-forge #127

Closed billytcl closed 3 years ago

billytcl commented 3 years ago

Issue: I get a mysterious Invalid spec error when trying to install from from conda-forge channel $ conda install -v -c conda-forge cupy Fetching package metadata ............. An unexpected error has occurred. Please consider posting the following information to the conda GitHub issue tracker at:

https://github.com/conda/conda/issues

Current conda install:

           platform : linux-64
      conda version : 4.3.30
   conda is private : False
  conda-env version : 4.3.30
conda-build version : 2.0.2
     python version : 2.7.13.final.0
   requests version : 2.19.1
   root environment : /venvs/anaconda  (read only)
default environment : /mnt/ix2/Experimental_tools/bonito_suzuki
   envs directories : /home/billylau/.conda/envs
                      /venvs/anaconda/envs
      package cache : /venvs/anaconda/pkgs
                      /home/billylau/.conda/pkgs
       channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                      https://conda.anaconda.org/conda-forge/noarch
                      https://repo.continuum.io/pkgs/main/linux-64
                      https://repo.continuum.io/pkgs/main/noarch
                      https://repo.continuum.io/pkgs/free/linux-64
                      https://repo.continuum.io/pkgs/free/noarch
                      https://repo.continuum.io/pkgs/r/linux-64
                      https://repo.continuum.io/pkgs/r/noarch
                      https://repo.continuum.io/pkgs/pro/linux-64
                      https://repo.continuum.io/pkgs/pro/noarch
        config file : /home/billylau/.condarc
         netrc file : None
       offline mode : False
         user-agent : conda/4.3.30 requests/2.19.1 CPython/2.7.13 Linux/5.4.0-72-generic debian/bullseye/sid glibc/2.31    
            UID:GID : 1348:1348

$ /mnt/ix2/Experimental_tools/bonito_suzuki/bin/conda install -v -c conda-forge cupy

Traceback (most recent call last):
  File "/venvs/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 640, in conda_exception_handler
    return_value = func(*args, **kwargs)
  File "/venvs/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 140, in _main
    exit_code = args.func(args, p)
  File "/venvs/anaconda/lib/python2.7/site-packages/conda/cli/main_install.py", line 80, in execute
    install(args, parser, 'install')
  File "/venvs/anaconda/lib/python2.7/site-packages/conda/cli/install.py", line 261, in install
    channel_priority_map=_channel_priority_map, is_update=isupdate)
  File "/venvs/anaconda/lib/python2.7/site-packages/conda/plan.py", line 489, in install_actions_list
    for specs_by_prefix in required_solves]
  File "/venvs/anaconda/lib/python2.7/site-packages/conda/plan.py", line 626, in get_actions_for_dists
    add_defaults_to_specs(r, linked, specs, prefix)
  File "/venvs/anaconda/lib/python2.7/site-packages/conda/plan.py", line 384, in add_defaults_to_specs
    depends_on = {s for s in mspecs if r.depends_on(s, name)}
  File "/venvs/anaconda/lib/python2.7/site-packages/conda/plan.py", line 384, in <setcomp>
    depends_on = {s for s in mspecs if r.depends_on(s, name)}
  File "/venvs/anaconda/lib/python2.7/site-packages/conda/resolve.py", line 524, in depends_on
    return depends_on_(MatchSpec(spec))
  File "/venvs/anaconda/lib/python2.7/site-packages/conda/resolve.py", line 522, in depends_on_
    for fn in self.find_matches(spec)
  File "/venvs/anaconda/lib/python2.7/site-packages/conda/resolve.py", line 523, in <genexpr>
    for ms in self.ms_depends(fn))
  File "/venvs/anaconda/lib/python2.7/site-packages/conda/resolve.py", line 505, in ms_depends
    deps = [MatchSpec(d) for d in rec.get('depends', [])]
  File "/venvs/anaconda/lib/python2.7/site-packages/conda/resolve.py", line 63, in __new__
    vspec = VersionSpec(parts[1])
  File "/venvs/anaconda/lib/python2.7/site-packages/conda/version.py", line 345, in __new__
    raise InvalidSpecError(spec)
InvalidSpecError: Invalid spec: =1.2.2.5


Environment (conda list):

``` $ conda list $ conda list # packages in environment at /mnt/ix2/Experimental_tools/bonito_suzuki: # _libgcc_mutex 0.1 main blas 1.0 mkl bzip2 1.0.8 h7b6447c_0 ca-certificates 2021.4.13 h06a4308_1 certifi 2020.12.5 py37h06a4308_0 cudatoolkit 11.1.74 h6bb024c_0 nvidia ffmpeg 4.3 hf484d3e_0 pytorch freetype 2.10.4 h5ab3b9f_0 gmp 6.2.1 h2531618_2 gnutls 3.6.15 he1e5248_0 intel-openmp 2021.2.0 h06a4308_610 jpeg 9b h024ee3a_2 lame 3.100 h7b6447c_0 lcms2 2.12 h3be6417_0 ld_impl_linux-64 2.33.1 h53a641e_7 libffi 3.3 he6710b0_2 libgcc-ng 9.1.0 hdf63c60_0 libiconv 1.15 h63c8f33_5 libidn2 2.3.0 h27cfd23_0 libpng 1.6.37 hbc83047_0 libstdcxx-ng 9.1.0 hdf63c60_0 libtasn1 4.16.0 h27cfd23_0 libtiff 4.1.0 h2733197_1 libunistring 0.9.10 h27cfd23_0 libuv 1.40.0 h7b6447c_0 lz4-c 1.9.3 h2531618_0 mkl 2021.2.0 h06a4308_296 mkl-service 2.3.0 py37h27cfd23_1 mkl_fft 1.3.0 py37h42c9631_2 mkl_random 1.2.1 py37ha9443f7_2 ncurses 6.2 he6710b0_1 nettle 3.7.2 hbbd107a_1 ninja 1.10.2 hff7bd54_1 numpy 1.20.1 py37h93e21f0_0 numpy-base 1.20.1 py37h7d8b39e_0 olefile 0.46 py_0 openh264 2.1.0 hd408876_0 openssl 1.1.1k h27cfd23_0 pillow 8.2.0 py37he98fc37_0 pip 21.0.1 py37h06a4308_0 python 3.7.10 hdb3f193_0 pytorch 1.8.1 py3.7_cuda11.1_cudnn8.0.5_0 pytorch readline 8.1 h27cfd23_0 setuptools 52.0.0 py37h06a4308_0 six 1.15.0 pyhd3eb1b0_0 sqlite 3.35.4 hdfb4753_0 tk 8.6.10 hbc83047_0 torchaudio 0.8.1 py37 pytorch torchvision 0.9.1 py37_cu111 pytorch typing_extensions 3.7.4.3 pyha847dfd_0 wheel 0.36.2 pyhd3eb1b0_0 xz 5.2.5 h7b6447c_0 zlib 1.2.11 h7b6447c_3 zstd 1.4.9 haebb681_0 ```


Details about conda and system ( conda info ):

``` $ conda info $ conda info Current conda install: platform : linux-64 conda version : 4.3.30 conda is private : False conda-env version : 4.3.30 conda-build version : 2.0.2 python version : 2.7.13.final.0 requests version : 2.19.1 root environment : /venvs/anaconda (read only) default environment : /mnt/ix2/Experimental_tools/bonito_suzuki envs directories : /home/billylau/.conda/envs /venvs/anaconda/envs package cache : /venvs/anaconda/pkgs /home/billylau/.conda/pkgs channel URLs : https://repo.continuum.io/pkgs/main/linux-64 https://repo.continuum.io/pkgs/main/noarch https://repo.continuum.io/pkgs/free/linux-64 https://repo.continuum.io/pkgs/free/noarch https://repo.continuum.io/pkgs/r/linux-64 https://repo.continuum.io/pkgs/r/noarch https://repo.continuum.io/pkgs/pro/linux-64 https://repo.continuum.io/pkgs/pro/noarch config file : /home/billylau/.condarc netrc file : None offline mode : False user-agent : conda/4.3.30 requests/2.19.1 CPython/2.7.13 Linux/5.4.0-72-generic debian/bullseye/sid glibc/2.31 UID:GID : 1348:1348 ```
leofang commented 3 years ago

I think your conda base env is too old (conda/4.3.30, CPython/2.7.13). Could you please try updating both conda and python in your base env, and then retry the installation? The =1.2.2.5 spec is coming from a recent repo metadata patch (https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/pull/141), and it looks like the patcher needs Python 3 to work.

billytcl commented 3 years ago

I don’t have permissions to change the base Python or conda on our server. Is there a way around this?

On Sun, May 9, 2021 at 12:06 AM Leo Fang @.***> wrote:

I think your conda base env is too old (conda/4.3.30, CPython/2.7.13). Could you please try updating both conda and python in your base env, and then retry the installation? The =1.2.2.5 spec is coming from a recent repo metadata patch ( conda-forge/conda-forge-repodata-patches-feedstock#141 https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/pull/141), and it looks like the patcher needs Python 3 to work.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/conda-forge/cupy-feedstock/issues/127#issuecomment-835719690, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPHYT6ATRSYEX76Q6OEMZDTMYX55ANCNFSM44OTTAUA .

leofang commented 3 years ago

@conda-forge/core Any advice?

chrisburr commented 3 years ago

@billytcl You can have your own conda installation anywhere you have write access to using one of the miniforge installers. That said I would encourage you to ask your sysadmin to update conda as 4.3 is very old and is likely to have other issues.

@leofang I think you can fix this properly cutensor =1.2.2.5 with cutensor 1.2.2.5.* in the patch generation script to keep support for these old conda versions.

it looks like the patcher needs Python 3 to work.

The patcher isn't ran by the client so it doesn't matter what version they're using. It's ran once on the server side as part of the generation process for the repodata.json blob.

leofang commented 3 years ago

Thanks for clarification @chrisburr.

@billytcl Could you please try installing a fresh conda to somewhere you have write access (say to your home directory) and avoid using the outdated base env, and then retry?

leofang commented 3 years ago

@billytcl Any luck?

leofang commented 3 years ago

@billytcl I am closing this issue due to no response. Feel free to reopen if you install a fresh conda in the user space but still have problems.