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

Cannot install package from server #41

Open
Zorobay opened this issue Jul 3, 2019 · 2 comments
Open

Cannot install package from server #41

Zorobay opened this issue Jul 3, 2019 · 2 comments

Comments

@Zorobay
Copy link

Zorobay commented Jul 3, 2019

So I have managed to setup the server and uploaded a package called test-pkg. It is visible both on the server filesystem and in the web interface.

I'm trying to install the package with pip3 but keep failing. I'm running

pip3 install -i http://x.x.x.x:8080/pypi --trusted-host x.x.x.x test-pkg --verbose

And get back:

Collecting test-pkg
  1 location(s) to search for versions of test-pkg:
  * http://X.X.X.X:8080/packages/test-pkg/
  Getting page http://X.X.X.X:8080/packages/test-pkg/
  Starting new HTTP connection (1): X.X.X.X
  http://X.X.X.X:8080 "GET /packages/test-pkg/ HTTP/1.1" 404 69
  Could not fetch URL http://X.X.X.X:8080/packages/test-pkg/: 404 Client Error: Not Found for url: http://X.X.X.X:8080/packages/test-pkg/ - skipping
  Could not find a version that satisfies the requirement test-pkg (from versions: )
Cleaning up...
No matching distribution found for test-pkg
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 353, in run
    wb.build(autobuilding=True)
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 514, in find_requirement
    'No matching distribution found for %s' % req
DistributionNotFound: No matching distribution found for test-pkg

I've tried every combination I could think of for the url and I always get the same error.

The last thing logged on the server is:

Jul 03 16:35:48 app02 pypi-server[15035]: [W 190703 16:35:48 web:2064] 404 GET /pypi/test-pkg/ (x.x.x.x) 0.31ms
@mosquito
Copy link
Owner

mosquito commented Jul 3, 2019

Use /simple endpoint for downloading packages.

@Zorobay
Copy link
Author

Zorobay commented Jul 4, 2019

Awesome, thanks. Maybe add this to the documentation? :)

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