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

Unable to Install Local Package #5162

Closed
m-navarro93 opened this issue Jan 31, 2024 · 3 comments
Closed

Unable to Install Local Package #5162

m-navarro93 opened this issue Jan 31, 2024 · 3 comments
Labels
locked [bot] locked due to inactivity source::anaconda created by members of Anaconda, Inc. stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::support neither a bug nor feature, is really just a user having questions or difficulty somewhere

Comments

@m-navarro93
Copy link

m-navarro93 commented Jan 31, 2024

What Happened?

Linked with #5161

When attempting to install a local conda package with conda install --use-local package-name I get an error that the specified package can't be found in any channel. I removed some files associated with my pyproject.toml build process such as MANIFEST.in and was able to successfully install the conda package afterwards. Including the removed files, uninstalling and installing the package again worked from then on, until just recently.

Example Output (Can't reproduce, new error occurring now, see below)
conda install --use-local package-name

Solving environment: ...working... failed

PackagesNotFoundError: The following packages are not available from current channels:

  - package-name

Current channels: ...

I saw that running conda build purge-all could fix some conda build issues so I ran it, rebuilt the package and attempted to install the package again and now get the following error. This is occurring after the previous error seemed to resolve itself.

conda install --use-local package-name

Channels:
 - local
 - conda-forge
 - defaults
 - anaconda-cloud
Platform: osx-arm64
Collecting package metadata (repodata.json): failed

UnavailableInvalidChannel: HTTP 404 UNAVAILABLE OR INVALID for channel Users/mnavarro/anaconda3/conda-bld <file:///Users/mnavarro/anaconda3/conda-bld>

The channel is not accessible or is invalid.

You will need to adjust your conda configuration to proceed.
Use `conda config --show channels` to view your configuration's current state,
and use `conda config --show-sources` to view config file locations.

As of conda 4.3, a valid channel must contain a `noarch/repodata.json` and
associated `noarch/repodata.json.bz2` file, even if `noarch/repodata.json` is
empty. Use `conda index /Users/mnavarro/anaconda3/conda-bld`, or create `noarch/repodata.json`
and associated `noarch/repodata.json.bz2`.

What Should Have Happened?

The local package should have been installed along with any dependencies and its entry point script. The package installs if a use the full tar ball filename, but it does not install dependencies this way.

Conda Details

conda info
active environment : test-env
    active env location : /Users/mnavarro/anaconda3/envs/test-env
            shell level : 2
       user config file : /Users/mnavarro/.condarc
 populated config files : /Users/mnavarro/.condarc
          conda version : 23.11.0
    conda-build version : 3.28.4
         python version : 3.11.5.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=m2
                          __conda=23.11.0=0
                          __osx=14.3=0
                          __unix=0=0
       base environment : /Users/mnavarro/anaconda3  (writable)
      conda av data dir : /Users/mnavarro/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-arm64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/osx-arm64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-arm64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://conda.anaconda.org/anaconda-cloud/osx-arm64
                          https://conda.anaconda.org/anaconda-cloud/noarch
          package cache : /Users/mnavarro/anaconda3/pkgs
                          /Users/mnavarro/.conda/pkgs
       envs directories : /Users/mnavarro/anaconda3/envs
                          /Users/mnavarro/.conda/envs
               platform : osx-arm64
             user-agent : conda/23.11.0 requests/2.31.0 CPython/3.11.5 Darwin/23.3.0 OSX/14.3 solver/libmamba conda-libmamba-solver/23.11.0 libmambapy/1.5.3 aau/0.4.2 c/LWkq5XB6fmUnHkqOBHOZjQ s/dkalXfAl5nsTc1w74nJSFg e/QbtH_TInxHJegDUD0ghjOg
                UID:GID : 502:20
             netrc file : None
           offline mode : False
conda config
==> /Users/mnavarro/.condarc <==
channels:
  - conda-forge
  - defaults
  - anaconda-cloud
conda list
# packages in environment at /Users/mnavarro/anaconda3/envs/test-env:
#
# Name                    Version                   Build  Channel
archspec                  0.2.2              pyhd8ed1ab_0    conda-forge
attrs                     23.2.0             pyh71513ae_0    conda-forge
beautifulsoup4            4.12.3             pyha770c72_0    conda-forge
boltons                   23.1.1             pyhd8ed1ab_0    conda-forge
brotli-python             1.1.0            py39hb198ff7_1    conda-forge
bzip2                     1.0.8                h93a5062_5    conda-forge
c-ares                    1.26.0               h93a5062_0    conda-forge
ca-certificates           2023.11.17           hf0a4a13_0    conda-forge
cctools                   973.0.1             hd1ac623_15    conda-forge
cctools_osx-arm64         973.0.1             h2a25c60_15    conda-forge
certifi                   2023.11.17         pyhd8ed1ab_0    conda-forge
cffi                      1.16.0           py39he153c15_0    conda-forge
chardet                   5.2.0            py39h2804cbe_1    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
click                     8.1.7           unix_pyh707e725_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda                     23.11.0          py39h2804cbe_1    conda-forge
conda-build               3.28.4           py39h2804cbe_0    conda-forge
conda-index               0.3.0              pyhd8ed1ab_1    conda-forge
conda-libmamba-solver     24.1.0             pyhd8ed1ab_0    conda-forge
conda-package-handling    2.2.0              pyh38be061_0    conda-forge
conda-package-streaming   0.9.0              pyhd8ed1ab_0    conda-forge
distro                    1.9.0              pyhd8ed1ab_0    conda-forge
filelock                  3.13.1             pyhd8ed1ab_0    conda-forge
fmt                       10.2.1               h2ffa867_0    conda-forge
icu                       73.2                 hc8870d7_0    conda-forge
idna                      3.6                pyhd8ed1ab_0    conda-forge
importlib_resources       6.1.1              pyhd8ed1ab_0    conda-forge
jinja2                    3.1.3              pyhd8ed1ab_0    conda-forge
jsonpatch                 1.33               pyhd8ed1ab_0    conda-forge
jsonpointer               2.4              py39h2804cbe_3    conda-forge
jsonschema                4.21.1             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.12.1          pyhd8ed1ab_0    conda-forge
krb5                      1.21.2               h92f50d5_0    conda-forge
ld64                      609                 h89fa09d_15    conda-forge
ld64_osx-arm64            609                 hc4dc95b_15    conda-forge
libarchive                3.7.2                hcacb583_1    conda-forge
libcurl                   8.5.0                h2d989ff_0    conda-forge
libcxx                    16.0.6               h4653b0c_0    conda-forge
libedit                   3.1.20191231         hc8eb9b7_2    conda-forge
libev                     4.33                 h93a5062_2    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libiconv                  1.17                 h0d3ecfb_2    conda-forge
liblief                   0.12.3               hb7217d7_0    conda-forge
libllvm15                 15.0.7               h2621b3d_4    conda-forge
libmamba                  1.5.6                h90c426b_0    conda-forge
libmambapy                1.5.6            py39ha004b9d_0    conda-forge
libnghttp2                1.58.0               ha4dd798_1    conda-forge
libsolv                   0.7.27               h9e231a4_0    conda-forge
libsqlite                 3.44.2               h091b4b1_0    conda-forge
libssh2                   1.11.0               h7a5bd25_0    conda-forge
libxml2                   2.12.4               h0d0cfa8_1    conda-forge
libzlib                   1.2.13               h53f4e23_5    conda-forge
lz4-c                     1.9.4                hb7217d7_0    conda-forge
lzo                       2.10              h642e427_1000    conda-forge
markupsafe                2.1.4            py39h17cfd9d_0    conda-forge
menuinst                  2.0.2            py39h2804cbe_0    conda-forge
more-itertools            10.2.0             pyhd8ed1ab_0    conda-forge
ncurses                   6.4                  h463b476_2    conda-forge
openssl                   3.2.1                h0d3ecfb_0    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
patch                     2.7.6             h27ca646_1002    conda-forge
pip                       23.3.2             pyhd8ed1ab_0    conda-forge
pkginfo                   1.9.6              pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_1    conda-forge
platformdirs              4.2.0              pyhd8ed1ab_0    conda-forge
pluggy                    1.4.0              pyhd8ed1ab_0    conda-forge
psutil                    5.9.8            py39h17cfd9d_0    conda-forge
py-lief                   0.12.3           py39h23fbdae_0    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycosat                   0.6.6            py39h0f82c59_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.9.18          hd7ebdb9_1_cpython    conda-forge
python-libarchive-c       5.0              py39h2804cbe_2    conda-forge
python_abi                3.9                      4_cp39    conda-forge
pytz                      2023.4             pyhd8ed1ab_0    conda-forge
pyyaml                    6.0.1            py39h0f82c59_1    conda-forge
readline                  8.2                  h92ec313_1    conda-forge
referencing               0.33.0             pyhd8ed1ab_0    conda-forge
reproc                    14.2.4.post0         h93a5062_1    conda-forge
reproc-cpp                14.2.4.post0         h965bd2d_1    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
ripgrep                   14.1.0               h5ef7bb8_0    conda-forge
rpds-py                   0.17.1           py39h8fec3ad_0    conda-forge
ruamel.yaml               0.18.5           py39h17cfd9d_0    conda-forge
ruamel.yaml.clib          0.2.7            py39h0f82c59_2    conda-forge
setuptools                69.0.3             pyhd8ed1ab_0    conda-forge
sigtool                   0.1.3                h44b9a77_0    conda-forge
soupsieve                 2.5                pyhd8ed1ab_1    conda-forge
tapi                      1100.0.11            he4954df_0    conda-forge
tk                        8.6.13               h5083fa2_1    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tqdm                      4.66.1             pyhd8ed1ab_0    conda-forge
tzdata                    2023d                h0c530f3_0    conda-forge
urllib3                   2.2.0              pyhd8ed1ab_0    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h57fd34a_0    conda-forge
yaml                      0.2.5                h3422bc3_2    conda-forge
yaml-cpp                  0.8.0                h13dd4ca_0    conda-forge
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge
zstandard                 0.22.0           py39h4818f0e_0    conda-forge
zstd                      1.5.5                h4f39d0f_0    conda-forge

Additional Context

My workflow to build and test the package locally is generally as follows:

  1. Create new conda env
  2. Build package
  3. CD into output directory
  4. Attempt to install package
  5. On failure, remove env, apply possible fix, restart steps.
@m-navarro93 m-navarro93 added the type::bug describes erroneous operation, use severity::* to classify the type label Jan 31, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in 🧭 Planning Jan 31, 2024
@kenodegard
Copy link
Contributor

run conda index /Users/mnavarro/anaconda3/conda-bld to resolve this new error

@m-navarro93
Copy link
Author

run conda index /Users/mnavarro/anaconda3/conda-bld to resolve this new error

That worked! Back to the original issue and I have an actual example of the output now:

Channels:
 - local
 - conda-forge
 - defaults
 - anaconda-cloud
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - aug

Current channels:

  - local
  - https://conda.anaconda.org/conda-forge
  - defaults
  - https://conda.anaconda.org/anaconda-cloud

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

@kenodegard kenodegard added source::anaconda created by members of Anaconda, Inc. type::support neither a bug nor feature, is really just a user having questions or difficulty somewhere and removed type::bug describes erroneous operation, use severity::* to classify the type labels Feb 9, 2024
Copy link

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label May 10, 2024
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label May 31, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2024
@github-project-automation github-project-automation bot moved this from 🆕 New to 🏁 Done in 🧭 Planning May 31, 2024
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Nov 27, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity source::anaconda created by members of Anaconda, Inc. stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::support neither a bug nor feature, is really just a user having questions or difficulty somewhere
Projects
Archived in project
Development

No branches or pull requests

2 participants