【解决】DETR系列环境配置过程中出现的Unable to access问题

【异常信息】

在DETR系列的代码环境配置过程中,在requirments.txt中常会有安装COCOAPI和panopticAPI,但是官方的代码常常是给以下的命令:

git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI&egg=pycocotools
git+https://github.com/cocodataset/panopticapi.git#egg=panopticapi

但是安装过程中,由于有些系统无法进行“科学上网”,所以会报异常:

fatal: unable to access 'https://github.com/cocodataset/cocoapi.git/': Empty reply from server
  error: subprocess-exited-with-error
  
  × git clone --quiet https://github.com/cocodataset/cocoapi.git /tmp/pip-install-mht0kgow/pycocotools_bde956953d94413f88636203cd823671 did not run successfully.
  │ exit code: 128
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× git clone --quiet https://github.com/cocodataset/cocoapi.git /tmp/pip-install-mht0kgow/pycocotools_bde956953d94413f88636203cd823671 did not run successfully.
│ exit code: 128
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

【问题解决】

1.COCOAPI

针对COCOAPI的安装问题,主要有两种途径,其实我在之前的博文中有提到点击访问,这里我还是推荐较简单的安装方法,即直接在Pycocotools清华源链接https://pypi.tuna.tsinghua.edu.cn/simple/pycocotools/ 下载所需版本的 pycocotools.whl 文件即可.

然后将其在目标环境中直接,即可成功安装

pip install pycocotools**.whl
2. panoptic API

可直接访问panoptic的github主页点击访问https://github.com/cocodataset/panopticapi#egg=panopticapi 

然后直接下载原代码,最好zip结尾吧。

然后将源码zip压缩包,上传至对应文件夹,在对应的虚拟环境中使用 pip install pan*.zip 即可成功安装。

  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要配置RT-DETR环境,你需要进行以下步骤: 1. 首先,你需要解压数据集压缩包。可以使用以下命令进行解压: ```shell python ppdet/modeling/tests/test_architectures.py 2.8 ``` 2. 确保你的系统满足以下要求:4个V100的CUDA版本大于等于11.7.1,NCCL版本大于等于2.7,以及PaddlePaddle-GPU版本大于等于2.4.1。 3. 创建一个名为ppdet的conda环境,并使用Python 3.10版本。可以使用以下命令创建环境: ```shell conda create --name ppdet python=3.10 ``` 4. 确认你的NCCL版本号。可以使用以下命令查看NCCL版本号: ```shell cat /usr/include/nccl.h | grep NCCL_MAJOR -A 2 ``` 5. 安装RT-DETR推荐的Paddle版本。 6. 如果你还没有安装cuDNN,可以参考《CUDA & cuDNN Installbook by Eric》进行安装。另外,你需要配置环境变量`LD_LIBRARY_PATH`,将其指向cuDNN的安装路径。可以使用以下命令进行配置: ```shell export LD_LIBRARY_PATH=/home/songyuc/anaconda3/envs/paddle/lib ``` 完成以上配置步骤后,你就可以开始使用RT-DETR了。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [RT-DETR的学习笔记](https://blog.csdn.net/songyuc/article/details/130242093)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值