conda-forge / miniforge

A conda-forge distribution.
https://conda-forge.org/miniforge
Other
5.79k stars 309 forks source link

Could not find setuptools when install a package without network on arm64 linux #470

Closed lindeer closed 1 year ago

lindeer commented 1 year ago

Solution to issue cannot be found in the documentation.

Issue

on my arm64 linux based on CentOS with kernel 4.14.0-115, just install the latest miniforge3(23.3.0-0-Linux-aarch64), and then installing a 'duckdb' source package without network resulted in 'Could not find a version that satisfies the requirement setuptools>=40.8.0 (from version: none)':

$ ./Miniforge3-23.3.0-0-Linux-aarch64.sh
$ conda create -n ecr --clone base
$ conda activate ecr
$ python -V
Python 3.10.12
$ pip install --use-pep517 ./duckdb-0.8.1.tar.gz --no-index
Processing ./duckdb-0.8.1.tar.gz
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  x pip subprocess to install build dependencies did not run successfully.
  exit code: 1
    [2 lines of output]
    ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from version: none)
    ERROR: No matching distribution found for setuptools>=40.8.0
    [end of output]

but setuptools actually exists in my environment:

$ conda list setuptools
# packages in environment at /app/work/miniforge3/envs/ecr:
# 
# Name                 Version               Build                 Channel
setuptools            68.0.0                  pyhd8ed1ab_0    conda-forge

$ pip list | grep setuptools
setuptools            68.0.0

How could I fix it? it is perplexing..

Installed packages

# packages in environment at /app/work/miniforge3/envs/ecr:
#
# Name                    Version                   Build  Channel
_openmp_mutex             4.5                       2_gnu    conda-forge
boltons                   23.0.0             pyhd8ed1ab_0    conda-forge
brotli                    1.0.9                h4e544f5_8    conda-forge
brotli-bin                1.0.9                h4e544f5_8    conda-forge
bzip2                     1.0.8                hf897c2e_4    conda-forge
ca-certificates           2023.5.7             hcefe29a_0    conda-forge
certifi                   2023.5.7           pyhd8ed1ab_0    conda-forge
cffi                      1.15.1          py310hf0c4615_3    conda-forge
charset-normalizer        3.1.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda-package-handling    2.0.2              pyh38be061_0    conda-forge
conda-package-streaming   0.8.0              pyhd8ed1ab_0    conda-forge
cryptography              41.0.1          py310h34e2850_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
ld_impl_linux-aarch64     2.40                 h2d8c526_0    conda-forge
libbrotlicommon           1.0.9                h4e544f5_8    conda-forge
libbrotlidec              1.0.9                h4e544f5_8    conda-forge
libbrotlienc              1.0.9                h4e544f5_8    conda-forge
libffi                    3.4.2                h3557bc0_5    conda-forge
libgcc-ng                 13.1.0               h2b4548d_0    conda-forge
libgomp                   13.1.0               h2b4548d_0    conda-forge
libnsl                    2.0.0                hf897c2e_0    conda-forge
libsqlite                 3.42.0               h194ca79_0    conda-forge
libstdcxx-ng              13.1.0               h452befe_0    conda-forge
libuuid                   2.38.1               hb4cce97_0    conda-forge
libzlib                   1.2.13               h31becfc_5    conda-forge
ncurses                   6.4                  h2e1726e_0    conda-forge
openssl                   3.1.1                h31becfc_1    conda-forge
packaging                 23.1               pyhd8ed1ab_0    conda-forge
pip                       23.1.2             pyhd8ed1ab_0    conda-forge
pluggy                    1.2.0              pyhd8ed1ab_0    conda-forge
pycosat                   0.6.4           py310h761cc84_1    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pyopenssl                 23.2.0             pyhd8ed1ab_1    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.10.12         hbbe8eec_0_cpython    conda-forge
python_abi                3.10                    3_cp310    conda-forge
readline                  8.2                  h8fc344f_1    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
ruamel.yaml               0.17.32         py310hb299538_0    conda-forge
ruamel.yaml.clib          0.2.7           py310hb89b984_1    conda-forge
setuptools                68.0.0             pyhd8ed1ab_0    conda-forge
tk                        8.6.12               hd8af866_0    conda-forge
toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
tqdm                      4.65.0             pyhd8ed1ab_1    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
urllib3                   2.0.3              pyhd8ed1ab_0    conda-forge
wheel                     0.40.0             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h9cdd2b7_0    conda-forge
zstandard                 0.19.0          py310h468e293_2    conda-forge
zstd                      1.5.2                h44f6412_6    conda-forge

Environment info

active environment : ecr
    active env location : /app/work/miniforge3/envs/ecr
            shell level : 1
       user config file : /home/lindeer/.condarc
 populated config files : /app/work/miniforge3/.condarc
                          /home/lindeer/.condarc
                          /app/work/miniforge3/envs/ecr/.condarc
          conda version : 23.3.0
    conda-build version : not installed
         python version : 3.10.12.final.0
       virtual packages : __archspec=1=aarch64
                          __glibc=2.17=0
                          __linux=4.14.0=0
                          __unix=0=0
       base environment : /app/work/miniforge3  (writable)
      conda av data dir : /app/work/miniforge3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-aarch64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /app/work/miniforge3/pkgs
                          /home/lindeer/.conda/pkgs
       envs directories : /app/work/miniforge3/envs
                          /home/lindeer/.conda/envs
               platform : linux-aarch64
             user-agent : conda/23.3.0 requests/2.31.0 CPython/3.10.12 Linux/4.19.71-arm64-desktop uos/20 glibc/2.28
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False
hmaarrfk commented 1 year ago

One the line

$ ./Miniforge3-23.3.0-0-Linux-aarch64.sh

Is successful, this installer is considered successful. Since you are trying to install a package from a tar archive, I suggest you discuss upstream.

lindeer commented 1 year ago

thanks @hmaarrfk, my question is why 'setuptools' could not be found while conda list shows that it is already installed. and where could I find 'upstream' you mentioned?

hmaarrfk commented 1 year ago

generally you can try to get more info

pip install -vv --no-build-isolation --no-deps .......THE REST OF THE ARGUMENTS....