alembic: v1.4.2 missing wheel when pip download and then pip install from .tar.gz
When I pip download alembic==1.4.2 and then pip install alembic from the downloaded .tar.gz file, then I get the following error:
ERROR: Command errored out with exit status 1:
command: /home/myself/anaconda3/envs/tmp3/bin/python /home/myself/anaconda3/envs/tmp3/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-c_bv0n7g/overlay
--no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links /home/myself/workspace/my_project/./ -- 'setuptools>=40.8.0' wheel
cwd: None
Complete output (4 lines):
Looking in links: /home/myself/workspace/my_project/./
Processing ./setuptools-46.0.0-py3-none-any.whl
ERROR: Could not find a version that satisfies the requirement wheel (from versions: none)
ERROR: No matching distribution found for wheel
----------------------------------------
ERROR: Command errored out with exit status 1: /home/myself/anaconda3/envs/tmp3/bin/python /home/myself/anaconda3/envs/tmp3/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix
/tmp/pip-build-env-c_bv0n7g/overlay --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links /home/myself/workspace/my_project/./ -- 'setuptools>=40.8.0' wheel Check
the logs for full command output.
However, the same procedure works with the versions before, like 1.4.1.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 25 (13 by maintainers)
My hint comes from the error on install of setuptools. My guess is:
Could you try using
--no-use-pep517to see if that is indeed the case?pip install --no-use-pep517 alembic-1.4.2.tar.gzworks, so given @zzzeek’s comment in sqlalchemy/sqlalchemy#5207 about conforming to best practices it’s up to me now to install with the--no-use-pep517flag whenever I’m offline?I’m trying to add explicit support for pep517 in https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/1804 and https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/1805
@pganssle there is no
muslplatform tag to my knowledge because I don’t think distutils supports it (see https://github.com/pypa/packaging/issues/259).Sorry, to be clear I meant that I don’t know if there’s a platform tag for
musltargets. I think it’s possible that on alpine you can only install universal wheels, locally-built wheels or install from source.@CaselIT The issue is not that
piprequires it but thatalembicrequires it to build a wheel, andpipis moving to a system where the workflow always goes through a wheel.The idea with PEP 517 is that when building from source distributions, the steps go like this:
pip) queries a project for its list of build-time dependencies. In this case you are using the default,setuptoolsandwheel, but you may have things likeCythonorflitin there instead.pipcreates an isolated environment (like a virtual environment) and installs all the build-time dependencies into it (these do not persist to runtime).pipinduces the backend (setuptools, in this case) to build a wheel.pipinstalls the wheel.Note that when you do it this way, if you get a wheel from any other source,
pip’s installation works the exact same way.What
pip wheeldoes is that it creates a “wheelhouse” which is a store of wheels that you can use to install whatever it is you need (including all its dependencies). It will try to download those wheels from PyPI first before building them.So I would not expect
pip wheelto installwheelin your environment, it will just install it in the isolated build environment when building a wheel foralembic, and thenpip install -t MY_WHEELHOUSE alembicwill just work (because the dependency onwheelonly exists when you are building the wheel, not at install time).So, like I said, the original poster can either include the appropriate build-time dependencies in their local mini-index or they can use
pip wheelto build their mini-index instead ofpip download, in which case they won’t need the build-time dependencies.