2016-03-17 182 views
1

我想使用包含在我的測試項目JSON模式一個GitHub的倉庫。PIP安裝從GitHub回購不起作用

我試圖與安裝: pip install git+https://github.com/org/repo.git

Collecting git+https://github.com/org/repo.git 
    Cloning https://github.com/org/repo.git to /var/folders/7v/yqj59phx3q71thk7b9819nlm0000gn/T/pip-6UQL0O-build 
    Complete output from command python setup.py egg_info: 
    Traceback (most recent call last): 
     File "<string>", line 1, in <module> 
    IOError: [Errno 2] No such file or directory: '/var/folders/7v/yqj59phx3q71thk7b9819nlm0000gn/T/pip-6UQL0O-build/setup.py' 

    ---------------------------------------- 
Command "python setup.py egg_info" failed with error code 1 in /var/folders/7v/yqj59phx3q71thk7b9819nlm0000gn/T/pip-6UQL0O-build/ 

第一個問題:爲什麼克隆到這個文件夾,而不是/Users/raitis/.virtualenvs/someenvironment/bin/python

第二個問題:我需要有setup.py文件的存儲庫,如果我想用PIP安裝嗎?

注:之後我可以用PIP安裝它,我將它添加到requirements.txt

回答

1

是的,你需要一個setup.py安裝你的庫。

匹克隆首先你的回購,然後在虛擬環境中嘗試一個python setup.py install

這是完全一樣的,當你的tar.gz安裝:首先,你下載它(git的克隆當量),然後再進行安裝(蟒蛇setup.py)