2013-03-14 25 views
7

這裏安裝包的問題是我的setup.py:從dependency_links

setup(
     ... 
     install_requires=['GEDThriftStubs'], 
     dependency_links=['git+ssh://[email protected]/ged-thrift-stubs.git#egg=GEDThriftStubs'], 
...) 

然後,我創建包:

python setup.py sdist 

然後我嘗試安裝它:

PIP安裝file://path/package-0.0.1.tar.gz

而得到這個終端:如果它,

Skipping link git+ssh://[email protected]/ged-thrift-stubs.git#egg=GEDThriftStubs; wrong project name (not gedthriftstubs) 

而且我沒有在我的項目的任何地方確切的名稱「gedthriftstubs」:

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此類郵件事項。

但是這工作得很好:

pip install git+ssh://[email protected]/ged-thrift-stubs.git#egg=GEDThriftStubs 
+0

的setup.py中指定的version啊,對不起,我的錯。 – 2013-03-14 12:15:31

+0

你想'sudo python setup.py sdist'或者只是'python setup.py sdist'? – 2014-01-12 23:50:32

+0

我在一個用戶和一個virtualenv下運行沒有sudo的兩個命令。 – azurkin 2014-02-02 08:01:13

回答

0

嘗試:

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

注意,這個標籤是從pip在PIP 1.6去除。 See this article on pip.pypa.io瞭解更多信息。

在pip 1.5處理依賴關係鏈接被棄用,它在pip 1.6中被完全刪除。

還有一個lengthy discussion (issue #1519)就PIP &相關性的聯繫

如果不工作,你可能還需要增加一個版本後綴你的鏈接,就像這樣:

git+ssh://[email protected]/ged-thrift-stubs.git#egg=GEDThriftStubs-0.0.1 

哪裏0.0.1ged-thrift-stubs