Ich verwende python version 2.7
und pip version is 1.5.6
.Pip Installation Abhängigkeit Links
Ich möchte zusätzliche Bibliotheken von URL installieren, wie ein Git Repo auf setup.py installiert wird.
Ich legte Extras in Parameter in setup.py
. Das bedeutet, meine Bibliothek benötigt zusätzliche Bibliotheken und sie müssen ebenfalls installiert werden.
...
install_requires=[
"Django",
....
],
...
Aber Urls wie git repos sind nicht gültige Zeichenfolge in install_requires
in setup.py
. Angenommen, ich möchte eine Bibliothek von Github installieren. Ich habe über dieses Problem gesucht und ich habe etwas gefunden, das ich Bibliotheken in dependency_links
in setup.py
setzen kann. Aber das funktioniert immer noch nicht. Hier ist meine Abhängigkeit Links Definition;
dependency_links=[
"https://github.com/.../tarball/master/#egg=1.0.0",
"https://github.com/.../tarball/master#egg=0.9.3",
],
Die Links sind gültig. Ich kann sie mit diesen URLs von einem Internetbrowser herunterladen. Diese zusätzlichen Bibliotheken sind immer noch nicht mit meiner Einrichtung installiert. Ich versuchte auch --process-dependency-links
Parameter, um Pip zu erzwingen. Aber das Ergebnis ist dasselbe. Ich nehme keinen Fehler beim Pippen.
Nach der Installation sehe ich keine Bibliothek in pip freeze
Ergebnis in dependency_links
. Wie kann ich sie mit meiner setup.py
Installation herunterladen lassen?
Edited:
Hier ist meine komplette setup.py
from setuptools import setup
try:
long_description = open('README.md').read()
except IOError:
long_description = ''
setup(
name='esef-sso',
version='1.0.0.0',
description='',
url='https://github.com/egemsoft/esef-sso.git',
keywords=["django", "egemsoft", "sso", "esefsso"],
install_requires=[
"Django",
"webservices",
"requests",
"esef-auth==1.0.0.0",
"django-simple-sso==0.9.3"
],
dependency_links=[
"https://github.com/egemsoft/esef-auth/tarball/master/#egg=1.0.0.0",
"https://github.com/egemsoft/django-simple-sso/tarball/master#egg=0.9.3",
],
packages=[
'esef_sso_client',
'esef_sso_client.models',
'esef_sso_server',
'esef_sso_server.models',
],
include_package_data=True,
zip_safe=False,
platforms=['any'],
)
2 Herausgegeben:
Hier pip log ist;
Downloading/unpacking esef-auth==1.0.0.0 (from esef-sso==1.0.0.0)
Getting page https://pypi.python.org/simple/esef-auth/
Could not fetch URL https://pypi.python.org/simple/esef-auth/: 404 Client Error: Not Found
Will skip URL https://pypi.python.org/simple/esef-auth/ when looking for download links for esef-auth==1.0.0.0 (from esef-sso==1.0.0.0)
Getting page https://pypi.python.org/simple/
URLs to search for versions for esef-auth==1.0.0.0 (from esef-sso==1.0.0.0):
* https://pypi.python.org/simple/esef-auth/1.0.0.0
* https://pypi.python.org/simple/esef-auth/
Getting page https://pypi.python.org/simple/esef-auth/1.0.0.0
Could not fetch URL https://pypi.python.org/simple/esef-auth/1.0.0.0: 404 Client Error: Not Found
Will skip URL https://pypi.python.org/simple/esef-auth/1.0.0.0 when looking for download links for esef-auth==1.0.0.0 (from esef-sso==1.0.0.0)
Getting page https://pypi.python.org/simple/esef-auth/
Could not fetch URL https://pypi.python.org/simple/esef-auth/: 404 Client Error: Not Found
Will skip URL https://pypi.python.org/simple/esef-auth/ when looking for download links for esef-auth==1.0.0.0 (from esef-sso==1.0.0.0)
Could not find any downloads that satisfy the requirement esef-auth==1.0.0.0 (from esef-sso==1.0.0.0)
Cleaning up...
Removing temporary dir /Users/ahmetdal/.virtualenvs/esef-sso-example/build...
No distributions at all found for esef-auth==1.0.0.0 (from esef-sso==1.0.0.0)
Exception information:
Traceback (most recent call last):
File "/Users/ahmetdal/.virtualenvs/esef-sso-example/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/Users/ahmetdal/.virtualenvs/esef-sso-example/lib/python2.7/site-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Users/ahmetdal/.virtualenvs/esef-sso-example/lib/python2.7/site-packages/pip/req.py", line 1177, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/Users/ahmetdal/.virtualenvs/esef-sso-example/lib/python2.7/site-packages/pip/index.py", line 277, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for esef-auth==1.0.0.0 (from esef-sso==1.0.0.0)
Es scheint, ist es nicht die Quellen in dependency_links
nicht verwendet.
Es heißt 'Konnte keine Downloads finden, die die Anforderung erfüllen my-extra-libraray == 1.0.0.0 (von my-installed-library-zZ == 1.0.0.0)' –
@AhmetDAL Sie haben beide Abhängigkeitsverknüpfungen und installieren erfordert angegeben? Kannst du das komplette 'setup.py', das du benutzt, posten? – mjallday
Bitte beachten Sie den bearbeiteten Teil meiner Frage. –