【问题标题】:Pip install using git+ssh not working for python package使用 git+ssh 进行 Pip 安装不适用于 python 包
【发布时间】:2019-11-23 06:03:57
【问题描述】:

我正在尝试安装这个 Python 包: https://pypi.org/project/SalesforcePy/#install

我在 macOS Mojave 上运行 python 3.7,我以前从未遇到过从 github 下载包的问题。

当我尝试 pip install git+ssh://git@github.com/forcedotcom/SalesforcePy.git

我明白了:

Collecting git+ssh://git@github.com/forcedotcom/SalesforcePy.git
  Cloning ssh://git@github.com/forcedotcom/SalesforcePy.git to /private/var/folders/xb/_9gc6p552hz8m7vjc5wbgjbm0000gp/T/pip-req-build-ly43g63b
  Running command git clone -q ssh://git@github.com/forcedotcom/SalesforcePy.git /private/var/folders/xb/_9gc6p552hz8m7vjc5wbgjbm0000gp/T/pip-req-build-ly43g63b
  git@github.com: Permission denied (publickey).
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
ERROR: Command "git clone -q ssh://git@github.com/forcedotcom/SalesforcePy.git /private/var/folders/xb/_9gc6p552hz8m7vjc5wbgjbm0000gp/T/pip-req-build-ly43g63b" failed with error code 128 in None

我也尝试在我的桌面上下载它并得到了这个:

pip install Desktop/SalesforcePy-1.1.1
Processing ./Desktop/SalesforcePy-1.1.1
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/xb/_9gc6p552hz8m7vjc5wbgjbm0000gp/T/pip-req-build-n3xo0za2/setup.py", line 7, in <module>
        with open(os.path.join(os.path.dirname(__file__), 'requirements.txt')) as fh:
    FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/xb/_9gc6p552hz8m7vjc5wbgjbm0000gp/T/pip-req-build-n3xo0za2/requirements.txt'
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/xb/_9gc6p552hz8m7vjc5wbgjbm0000gp/T/pip-req-build-n3xo0za2/

【问题讨论】:

    标签: python-3.x github pip installation


    【解决方案1】:

    第二条错误消息由forcedotcom/SalesforcePy issue 41 跟踪,仍在等待处理。

    第一个应该可以工作(它是一个 public 存储库)和is the recommended methodThe syntax 是正确的(到处使用 '/')。
    这可能是第二条错误消息的结果:来自requirement.txt, which might needs a preprocessing, as in this project 的错误。

    【讨论】:

      猜你喜欢
      • 2019-08-28
      • 1970-01-01
      • 2015-03-17
      • 2012-12-31
      • 2018-06-25
      • 1970-01-01
      • 1970-01-01
      • 2018-06-28
      • 1970-01-01
      相关资源
      最近更新 更多