I am trying to install the SQLACodegen package and its dependencies (inflect, setuptools-scm) from source, in an offline environment. Specifically, I have an Anaconda 2020.07 install using Python 3.8, on a Red Hat Enterprise Linux 7 system.
I have the Anaconda bin directory prepended to PATH, and I install using python -m pip install whatever.tar.gz
. Yes, I know it's a sin to use pip
over conda
like this. It just so happens that this is the easier way about things when installing upstream packages and I've never had an issue installing many other packages before now.
The problem is that pip is trying to go out to the internet to download and install setuptools
. The strange part is that setuptools is already installed and meets the version requirements of the package. Even when I specify pip flags such as --no-index -f /path/to/packages
, it still fails to detect the installed setuptools and tries to pull it from somewhere.
Example output:
[root@myserver stuff]# ls
inflect-4.1.0.tar.gz setuptools_scm-4.1.2.tar.gz sqlacodegen-2.1.0.tar.gz
[root@myserver stuff]# which python
/usr/local/anaconda-2020.07/bin/python
[root@myserver stuff]# python -V
Python 3.8.3
[root@myserver stuff]# python -m pip list | grep setuptools
setuptools 49.2.0.post20200714
[root@myserver stuff]# python -m pip install --no-index -f . sqlacodegen-2.1.0.tar.gz
Looking in links: .
Processing ./sqlacodegen-2.1.0.tar.gz
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/anaconda-2020.07/bin/python /usr/local/anaconda-2020.07/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env/r61p50oe/overlay --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links . -- 'setuptools >= 36.2.7' wheel 'setuptools_scm >= 1.7.0'
cwd: None
Complete output (3 lines):
Looking in links: .
ERROR: Could not find a version that satisfies the requirement setuptools>=36.2.7 (from versions: none)
ERROR: No matching distribution found for setuptools>=36.2.7
I have a feeling the --ignore-installed
flag might be part of the problem, but I don't know how to override it, it looks like pip slaps on numerous options on its own. Has anyone encountered a similar situation and resolved it?