【问题标题】:pip install editable cant' find master branchpip install editable cant' find master 分支
【发布时间】:2021-10-06 14:53:55
【问题描述】:

我需要安装django-activity-stream 的主分支。因此我把 下面一行到我的requirements.txt

-e git+git@github.com:justquick/django-activity-stream.git@master#egg=django-activity-stream

我以前工作过,但是坏了

Python 3.9.1 点 21.2.4

尝试:

pip install -e git+git@github.com:justquick/django-activity-stream.git@master#egg=django-activity-stream
ERROR: git+git@github.com:justquick/django-activity-stream.git@master#egg=django-activity-stream is not a valid editable 
requirement. It should either be a path to a local project or a VCS URL 
(beginning with bzr+http, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp, 
bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http,
 hg+https, hg+ssh, hg+static-http, svn+ssh, svn+http, svn+https, svn+svn, svn+file).

pip install -e git+ssh://github.com:justquick/django-activity-stream.git@master#egg=django-activity-stream
Obtaining django-activity-stream from git+ssh://github.com:justquick/django-activity-stream.git@master#egg=django-activity-stream
  Cloning ssh://github.com:justquick/django-activity-stream.git (to revision master) to /Users/sarit/.pyenv/versions/3.9.1/envs/multy_herr/src/django-activity-stream
  Running command git clone -q ssh://github.com:justquick/django-activity-stream.git /Users/sarit/.pyenv/versions/3.9.1/envs/multy_herr/src/django-activity-stream
  ssh: Could not resolve hostname github.com:justquick: nodename nor servname provided, or not known
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
WARNING: Discarding git+ssh://github.com:justquick/django-activity-stream.git@master#egg=django-activity-stream. Command errored out with exit status 128: git clone -q ssh://github.com:justquick/django-activity-stream.git /Users/sarit/.pyenv/versions/3.9.1/envs/multy_herr/src/django-activity-stream Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement django-activity-stream (unavailable) (from versions: 0.2, 0.2.1, 0.3, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.4.0b1, 0.4.0b2, 0.4.0b3, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5b1, 0.4.5, 0.5.0b1, 0.5.0, 0.5.1, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.7.0, 0.8.0, 0.9.0, 0.10.0)
ERROR: No matching distribution found for django-activity-stream (unavailable)

参考资料: pip install via requirements.txt specify a direct GitHub private repo + branch name erroring with exit status 128 https://het.as.utexas.edu/HET/Software/Pip/reference/pip_install.html

问题: 安装django-activity-stream的master分支的正确可编辑是什么?

【问题讨论】:

    标签: pip


    【解决方案1】:

    这些网址对我有用:

    pip install -e 'git+ssh://git@github.com/justquick/django-activity-stream.git@master#egg=django-activity-stream'
    

    pip install -e 'git+https://github.com/justquick/django-activity-stream.git@master#egg=django-activity-stream'
    

    似乎pip 不理解类似 scp 的 Git URL。

    【讨论】:

      猜你喜欢
      • 2015-07-30
      • 2017-01-14
      • 2013-11-05
      • 1970-01-01
      • 2015-11-29
      • 2011-12-05
      • 2022-07-13
      • 1970-01-01
      • 2016-09-24
      相关资源
      最近更新 更多