首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Git,Conda --如何在新的Git策略到位的情况下"pip安装git+git:<repo>“?

Git,Conda --如何在新的Git策略到位的情况下"pip安装git+git:<repo>“?
EN

Stack Overflow用户
提问于 2022-04-05 18:32:59
回答 1查看 641关注 0票数 1

我有这个conda文件,用于安装依赖项和创建一个新的conda。

conda_env.ymlhttps://github.com/MishaLaskin/rad分叉

代码语言:javascript
复制
name: rad
channels:
  - defaults
dependencies:
  - python=3.6
  - pytorch
  - torchvision
  - cudatoolkit=9.2
  - absl-py
  - pyparsing
  - pillow=6.1
  - pip:
    - termcolor
    - git+git://github.com/deepmind/dm_control.git
    - git+git://github.com/1nadequacy/dmc2gym.git
    - tb-nightly
    - imageio
    - imageio-ffmpeg
    - torchvision
    - scikit-image
    - tabulate

我试着运行conda env create --file conda_env.yml,这是我得到的堆栈跟踪。

代码语言:javascript
复制
Collecting package metadata (repodata.json): done
Solving environment: done
Installing pip dependencies: - Ran pip subprocess with arguments:
['/home/dyung6/anaconda3/envs/rad/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/dyung6/rad/condaenv.835gcx7g.requirements.txt']
Pip subprocess output:
Collecting git+git://github.com/deepmind/dm_control.git (from -r /home/dyung6/rad/condaenv.835gcx7g.requirements.txt (line 2))
  Cloning git://github.com/deepmind/dm_control.git to /tmp/pip-req-build-nc4w5hv8

Pip subprocess error:
  Running command git clone -q git://github.com/deepmind/dm_control.git /tmp/pip-req-build-nc4w5hv8
  fatal: remote error:
    The unauthenticated git protocol on port 9418 is no longer supported.
  Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
WARNING: Discarding git+git://github.com/deepmind/dm_control.git. Command errored out with exit status 128: git clone -q git://github.com/deepmind/dm_control.git /tmp/pip-req-build-nc4w5hv8 Check the logs for full command output.
ERROR: Command errored out with exit status 128: git clone -q git://github.com/deepmind/dm_control.git /tmp/pip-req-build-nc4w5hv8 Check the logs for full command output.
                                                                                                                                                                                                               failed

CondaEnvException: Pip failed

似乎新的git策略阻止了您这样做。不管怎么说,这附近有吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-04-05 21:01:09

正如@torek所指出的,以及错误消息中指向的文档,git://协议已经在GitHub上逐步淘汰。切换到使用https://,即在本例中:

代码语言:javascript
复制
  - pip:
    - git+https://github.com/deepmind/dm_control.git
    - git+https://github.com/1nadequacy/dmc2gym.git
    ...
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71756789

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档