Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'conda install --use-local' does not find a local package that is found by 'conda search' #7024

Closed
pjh5 opened this issue Mar 12, 2018 · 9 comments

Comments

Projects
None yet
8 participants
@pjh5
Copy link

commented Mar 12, 2018

I'm submitting a...

  • [ x ] bug report
  • feature request

Current Behavior

conda install --use-local can't find a package that was previously built with conda build. This occurs in the root env and in a brand new env called 'testenv'.

Steps to Reproduce

# A call to conda-build finished with
updating: caffe2-0.8.dev-py27h5b96e0f_0.tar.bz2
Updating index at /opt/conda/conda-bld/linux-64 to make package installable with dependencies
INFO:conda_build.build:Updating index at /opt/conda/conda-bld/linux-64 to make package installable with dependencies
Updating index at /opt/conda/conda-bld/noarch to make package installable with dependencies
INFO:conda_build.build:Updating index at /opt/conda/conda-bld/noarch to make package installable with dependencies
Nothing to test for: /opt/conda/conda-bld/linux-64/caffe2-0.8.dev-py27h5b96e0f_0.tar.bz2
# Automatic uploading is disabled
# If you want to upload package(s) to anaconda.org later, type:

anaconda upload /opt/conda/conda-bld/linux-64/caffe2-0.8.dev-py27h5b96e0f_0.tar.bz2

# To have conda build upload to anaconda.org automatically, use
# $ conda config --set anaconda_upload yes

anaconda_upload is not set.  Not uploading wheels: []

# Then
root@3bc896e43bc2:~/caffe2# conda search caffe2 -c local
Fetching package metadata .............
caffe2                       0.8.dev          py27h5b96e0f_0  local
root@3bc896e43bc2:~/caffe2# conda install caffe2 -c local
Fetching package metadata .............
Solving package specifications:

PackageNotFoundError: Packages missing in current channels:

  - caffe2

We have searched for the packages in the following channels:

  - file:///opt/conda/conda-bld/linux-64
  - file:///opt/conda/conda-bld/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
# conda install caffe2 --use-local gives the same output

Expected Behavior

The package should be found and installed along with its dependencies.

Environment Information

`conda info`

root@3bc896e43bc2:~/caffe2# 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 : 3.0.27
         python version : 2.7.14.final.0
       requests version : 2.18.4
       root environment : /opt/conda  (writable)
    default environment : /opt/conda/envs/testenv
       envs directories : /opt/conda/envs
                          /root/.conda/envs
          package cache : /opt/conda/pkgs
                          /root/.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 : None
             netrc file : None
           offline mode : False
             user-agent : conda/4.3.30 requests/2.18.4 CPython/2.7.14 Linux/4.9.60-linuxkit-aufs debian/stretch/sid glibc/2.23
                UID:GID : 0:0

`conda config --show-sources`

This command doesn't output anything

`conda list --show-channel-urls`

conda list --show-channel-urls
# packages in environment at /opt/conda/envs/testenv:
#

@mbargull

This comment has been minimized.

Copy link
Member

commented Mar 13, 2018

Do you get the same error after you conda update conda to the latest version?

@pjh5

This comment has been minimized.

Copy link
Author

commented Mar 19, 2018

Sorry for the late reply. I haven't actually been able to reproduce this. It didn't seem like consistent behavior. Feel free to close for now. I will add more info if I ever encounter it again.

I was calling conda build on an Ubuntu 16.04 docker image with Anaconda 2.5.1 installed (installed with https://github.com/caffe2/caffe2/blob/master/docker/jenkins/common/install_anaconda.sh ). The script used to call conda build was https://github.com/caffe2/caffe2/blob/master/scripts/build_anaconda.sh . I was making changes to what packages I was including in the meta.yaml, and sometimes this error would appear, but I can't find the combination of packages that caused it.

@kalefranz

This comment has been minimized.

Copy link
Member

commented Mar 19, 2018

Could be an issue with conda-build here too. conda update conda-build

@krinsman

This comment has been minimized.

Copy link

commented Oct 2, 2018

If it's any consolation, I've had weird behavior when using conda in Docker containers too. They seemed honestly more like a problem with Docker (or the Bourne shell) than with conda.

@certik

This comment has been minimized.

Copy link
Contributor

commented Oct 22, 2018

The same problem here with the latest conda and conda-build. The command

$ conda install my_package --use-local

fails, but this works:

$ conda install -c file:///home/certik/ext/miniconda3/envs/my-env/conda-bld/ my_package

I used the my-env environment to call conda-build to build the package.

Update: Here is a more convenient command to install the local package:

conda install -c file://${CONDA_PREFIX}/conda-bld/ my_package
@stas00

This comment has been minimized.

Copy link

commented Dec 15, 2018

Indeed, --use-local is not working, conda-build 3.17.5 here.

Building upon @certik's tip, on linux it'd be:

conda install -c ${CONDA_PREFIX}/conda-bld/ my_package

Or w/o the channel, but with full path:

conda install --offline /full/path/to/my_package-....tar.bz2
@egpbos

This comment has been minimized.

Copy link

commented Jan 9, 2019

I have the same problem and the solution by @certik works for me. Conda-build version 3.17.3, Conda 4.5.12.

Could the issue be related to having set only conda-forge and defaults as channels in ~/.condarc?

@egpbos

This comment has been minimized.

Copy link

commented Jan 9, 2019

Indeed, when I remove the channels list from ~/.condarc, and install my local package with

conda install my_package -c conda-forge -c local

it works fine again.

@tovrstra

This comment has been minimized.

Copy link

commented Mar 6, 2019

Same problem here with:

          conda version : 4.6.7
    conda-build version : 3.17.8
         python version : 3.6.8.final.0

This is a showstopper when one relies on conda build to find local dependencies built previously. It cannot, for the same reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.