Trouble installing private github repository using pip

前端 未结 4 987
被撕碎了的回忆
被撕碎了的回忆 2020-12-15 17:22

To preface, I have already seen this question Is it possible to use pip to install a package from a private github repository?

I am trying to install a package from

4条回答
  •  无人及你
    2020-12-15 18:13

    Had virtualenv activated and had to install a series of applications from github.com from a text file.

    (venv)$ cat requirements.txt
    -e git://github.com/boto/botocore.git@develop#egg=botocore
    -e git://github.com/boto/jmespath.git@develop#egg=jmespath
    -e git://github.com/boto/s3transfer.git@develop#egg=s3transfer
    nose==1.3.3
    mock==1.3.0
    wheel==0.24.0
    unittest2==0.5.1; python_version == '2.6'
    
    (venv)$ pip install -r requirements.txt
    Ignoring unittest2: markers 'python_version == "2.6"' don't match your environment Obtaining botocore from git+git://github.com/boto/botocore.git@develop#egg=botocore (from -r requirements.txt (line 1))
    Cloning git://github.com/boto/botocore.git (to develop) to ./venv/src/botocore
    fatal: unable to connect to github.com:
    github.com[0: 192.30.253.112]: errno=Connection timed out
    github.com[1: 192.30.253.113]: errno=Connection timed out
    
    Command "git clone -q git://github.com/boto/botocore.git 
    /home/ubuntu/utils/boto3/venv/src/botocore" failed with error code 128 in None
    

    However, as @Robeezy suggested, edited the requirement.txt and changed from

    -e git://github.com...
    

    to

    -e git+https://github.com...
    

    That is the link provided if you were to clone from the site (only options were Clone or Download).

    So, thank you! It did work finally.

提交回复
热议问题