【问题标题】:Installing package from github with pip - error使用 pip 从 github 安装包 - 错误
【发布时间】:2021-02-17 08:15:45
【问题描述】:

我正在尝试将 GPdoemd 包 (https://github.com/cog-imperial/GPdoemd) 安装在一个 merderl 环境中,但是当我尝试运行以下代码时:pip install git+https://github.com/cog-imperial/GPdoemd 我收到此错误:

Collecting git+https://github.com/cog-imperial/GPdoemd Cloning https://github.com/cog-imperial/GPdoemd to c:\users\i6817\appdata\local\temp\pip-req-build-df6ldcn1 ERROR: Command errored out with exit status 128: git clone -q https://github.com/cog-imperial/GPdoemd 'C:\Users\I6817\AppData\Local\Temp\pip-req-build-df6ldcn1' Check the logs for full command output.

有谁知道如何解决这个问题?谢谢!

【问题讨论】:

  • 你可以试试这种方式It is also possible to clone into/download the GPdoemd git repository and install it using setup.py, but this is not recommended for most users.
  • 是的,我知道,但我想找到一种方法来安装它,如上所述
  • 您是否安装了git 并在$PATH 中可用?你能用git clone https://github.com/cog-imperial/GPdoemd.git克隆repo吗?

标签: python installation pip


【解决方案1】:

我已经尝试了以下命令,它对我有用。我使用了 python 3.8.5 和 Ubuntu 操作系统。

python3 -m venv myenv

source myenv/bin/activate

pip install --upgrade pip

pip install wheel

pip install numpy scipy six paramz matplotlib

pip install GPy

pip install git+https://github.com/cog-imperial/GPdoemd

结果:

(myenv)computer:/test$ python

Python 3.8.5 (default, Jul 28 2020, 12:59:40) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import GPdoemd
>>> GPdoemd.__version__
'1.1'

【讨论】:

  • 我设法在一个新的空虚拟环境中成功运行pip install git+https://github.com/cog-imperial/GPdoemd.git,即使没有安装依赖项; pip 在克隆后安装它们。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-11-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-07-07
相关资源
最近更新 更多