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

Fails to install existing package in local package index #87

Open
cornelinux opened this issue Mar 25, 2019 · 1 comment
Open

Fails to install existing package in local package index #87

cornelinux opened this issue Mar 25, 2019 · 1 comment

Comments

@cornelinux
Copy link

cornelinux commented Mar 25, 2019

I create a local package index.
I used pip2pi 0.8.0 and ran it like:

% pip2tgz /tmp/packages <mypackage>
% pip2tgz /tmp/packages -r requirements.txt
% dir2pi /tmp/packages

Then I try to use this local package index.
But some package fail to install, like "Flask-Migrate", which was a dependency when I created the package index.

It fails like this:

% pip install -v --index-url=file:///tmp/packages/simple Flask-Migrate
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Created temporary directory: /tmp/pip-ephem-wheel-cache-Ki7Psq
Created temporary directory: /tmp/pip-req-tracker-sw4mfK
Created requirements tracker '/tmp/pip-req-tracker-sw4mfK'
Created temporary directory: /tmp/pip-install-xve0jb
Looking in indexes: file:///tmp/packages/simple
Collecting Flask-Migrate
  1 location(s) to search for versions of Flask-Migrate:
  * file:///tmp/packages/simple/flask-migrate/
   file: URL is directory, getting file:///tmp/packages/simple/flask-migrate/index.html
  Getting page file:///tmp/packages/simple/flask-migrate/index.html
  Analyzing links from page file:///tmp/packages/simple/flask-migrate/index.html
    Skipping link file:///tmp/packages/simple/flask-migrate/Flask-Migrate-2.4.0-py2.py3-none-any.whl (from file:///tmp/packages/simple/flask-migrate/index.html); wrong project name (not Flask-Migrate)
  Could not find a version that satisfies the requirement Flask-Migrate (from versions: )
Cleaning up...
Removed build tracker '/tmp/pip-req-tracker-sw4mfK'
No matching distribution found for Flask-Migrate
Exception information:
Traceback (most recent call last):
  File "/home/cornelius/src/ubuntu/DEBUILD/privacyidea.orig/TEST/local/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 179, in main
    status = self.run(options, args)
  File "/home/cornelius/src/ubuntu/DEBUILD/privacyidea.orig/TEST/local/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 315, in run
    resolver.resolve(requirement_set)
  File "/home/cornelius/src/ubuntu/DEBUILD/privacyidea.orig/TEST/local/lib/python2.7/site-packages/pip/_internal/resolve.py", line 131, in resolve
    self._resolve_one(requirement_set, req)
  File "/home/cornelius/src/ubuntu/DEBUILD/privacyidea.orig/TEST/local/lib/python2.7/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/home/cornelius/src/ubuntu/DEBUILD/privacyidea.orig/TEST/local/lib/python2.7/site-packages/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
    self.require_hashes
  File "/home/cornelius/src/ubuntu/DEBUILD/privacyidea.orig/TEST/local/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 269, in prepare_linked_requirement
    req.populate_link(finder, upgrade_allowed, require_hashes)
  File "/home/cornelius/src/ubuntu/DEBUILD/privacyidea.orig/TEST/local/lib/python2.7/site-packages/pip/_internal/req/req_install.py", line 196, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/home/cornelius/src/ubuntu/DEBUILD/privacyidea.orig/TEST/local/lib/python2.7/site-packages/pip/_internal/index.py", line 688, in find_requirement
    'No matching distribution found for %s' % req
DistributionNotFound: No matching distribution found for Flask-Migrate
@Ezibenroc
Copy link

I have the same problem for package cryptography using Python 3.8.

With pip2pi it fails with the error "not a supported wheel on this platform":

pip2pi /tmp/packages/ cryptography
pip install /tmp/packages/cryptography*.whl

With a simple pip download it works:

pip download cryptography
pip install cryptography*.whl

Note that the wheel actually used in both cases differ.

  • pip2pi downloads the wheel cryptography-36.0.1-cp36-abi3-manylinux_2_24_x86_64.whl
  • pip downloads the wheel cryptography-36.0.1-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

I am not sure of the difference between these two wheels. I tried to unzip them and compute a checksum for each of their files, there are only 4 different files:

  • cryptography-36.0.1.dist-info/RECORD
  • cryptography-36.0.1.dist-info/WHEEL
  • cryptography/hazmat/bindings/_openssl.abi3.so
  • cryptography/hazmat/bindings/_rust.abi3.so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants