簡體   English   中英

從dependency_links安裝包的問題

[英]Problems with installing package from dependency_links

這是我的setup.py:

    setup(
        ...
        install_requires=['GEDThriftStubs'],
        dependency_links=['git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs'],
...)

然后我創建包:

python setup.py sdist

然后我嘗試安裝它:

pip install file://path/package-0.0.1.tar.gz

在終端中獲取此信息:

Downloading/unpacking GEDThriftStubs (from package==0.0.1)
  Could not find any downloads that satisfy the requirement GEDThriftStubs (from package==0.0.1)
No distributions at all found for GEDThriftStubs (from package==0.0.1)

在像這樣的pip.log消息中:

Skipping link git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs; wrong project name (not gedthriftstubs)

如果重要的話,我的項目中沒有任何名稱為“gedthriftstubs”的名稱。

但這很好用:

pip install git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs

嘗試:

$ pip install --process-dependency-links file://path/package-0.0.1.tar.gz

請注意,此標記已從pip 1.6中的pip中刪除。 有關更多信息, 請參閱pip.pypa.io上的這篇文章

在pip 1.5中,處理依賴性鏈接已棄用,並且已在pip 1.6中完全刪除。

關於點和依賴關系鏈接也有一個冗長的討論(問題#1519)

如果這不起作用,您可能還需要在鏈接上添加版本后綴,如下所示:

git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs-0.0.1

其中0.0.1ged-thrift-stubs的setup.py中指定的version

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM