나는 python version 2.7
과 pip version is 1.5.6
을 사용하고 있습니다.pip install dependency links
setup.py 설치 중에 git repo처럼 url에서 추가 라이브러리를 설치하고 싶습니다.
나는 install_requires
매개 변수에 엑스트라를 setup.py
에 넣었습니다. 즉, 제 라이브러리에는 추가 라이브러리가 필요하며 설치해야합니다.
...
install_requires=[
"Django",
....
],
...
그러나 URL을 자식 REPOS 등 setup.py
에서 install_requires
에서 유효하지 않은 문자열입니다. 내가 github에서 라이브러리를 설치하려고한다고 가정 해보십시오. 그 문제에 대해 조사한 결과 나는 dependency_links
에 setup.py
에있는 라이브러리를 넣을 수있는 것을 발견했습니다. 하지만 여전히 작동하지 않습니다. 다음은 내 의존성 링크 정의입니다.
dependency_links=[
"https://github.com/.../tarball/master/#egg=1.0.0",
"https://github.com/.../tarball/master#egg=0.9.3",
],
링크가 유효합니다. 이 URL을 인터넷 브라우저에서 다운로드 할 수 있습니다. 이러한 추가 라이브러리는 여전히 내 설정과 함께 설치되지 않습니다. 나 또한 --process-dependency-links
매개 변수를 강제로 시도했습니다. 그러나 결과는 같습니다. 나는 뚝을 찰 때 아무 과실도 가지고 가지 않는다.
설치 후 pip freeze
에 라이브러리가 없으므로 dependency_links
이 표시됩니다.
내 setup.py
설치로 어떻게 다운로드 할 수 있습니까?
편집 : 여기
가 내 전체 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 편집 :
다음이 핍 로그입니다;
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)
소스가 dependency_links
인 것으로 보입니다.
''my-extra-libraray == 1.0.0.0 (my-installed-library-currently == 1.0.0.0에서) '을 만족하는 다운로드를 찾을 수 없습니다' –
@AhmetDAL 당신은 의존성 링크 설치가 지정되어 있어야합니까? 당신이 사용하고있는'setup.py'를 게시 할 수 있습니까? – mjallday
내 질문에 편집 된 부분을 참조하십시오. –