2016-03-17 183 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)