最近为了课题,从https://github.com/ultralytics/yolov3 这里下载了代码并准备配置环境去训练我自己的数据。配置过程中出现了问题。
背景
由于我一开始用虚拟机装Ubuntu后配置基本功能就各种报错,不耐烦之后又按老师推荐下了docker,但是因为我是win10家庭版,安装过程也特别曲折。安装完之后发现现在阿里云里提供的镜像特别少,也没看到我需要的(难道是我的打开方式有问题?)反正最终也放弃了。现在选择直接在win10里用annaconda配置Pytorch来运行代码进行训练。
配置要求
git clone获取的文件里requirements.txt的配置要求有
numpy
opencv-python >= 4.1
torch >= 1.4
matplotlib
pycocotools
tqdm
pillow
我已经在annaconda的base环境里安装了pytorch框架,搜索得到没有安装的只有opencv-python和pycocotools。在安装这两个包的过程中出现了各种各样的问题。
opencv-python我通过pip的方式安装成功了,但是我也不知道装到哪里去了,也没有找到把它添加到annaconda环境里的方法。如果大佬有知道怎么解决就顺便教下我吧orz
最大的问题出现在安装pycocotools上。
问题与尝试过的解决方法
我在论坛里查了一下,目前有人提供了可在windows上下载pycocotools的链接:https://github.com/philferriere/cocoapi 。给出的教程有以下几步:
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
我实际操作的过程:
文字版如下:
(base) D:\Anaconda3\Lib\site-packages>pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
Collecting git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
Cloning https://github.com/philferriere/cocoapi.git to c:\users\********\appdata\local\temp\pip-req-build-m06w4ozg
Running command git clone -q https://github.com/philferriere/cocoapi.git 'C:\Users\********\AppData\Local\Temp\pip-req-build-m06w4ozg'
fatal: early EOF
fatal: the remote end hung up unexpectedly
fatal: index-pack failed
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
ERROR: Command errored out with exit status 128: git clone -q https://github.com/philferriere/cocoapi.git 'C:\Users\********\AppData\Local\Temp\pip-req-build-m06w4ozg' Check the logs for full command output.
我的git刚刚升级时勾选了可以git字符网址,不过运行了还是这个报错。网上有说可以修改git config的,但是我搜索了我的所有安装盘都没有找到git的配置文件,就不了了之了。
向大佬们求一个解决方法!
你看看是不是网络的问题,我家的网络访问github一直很慢,出现了一样的问题,切换到手机热点完美解决。
博主后来解决了吗? 我也是同样的报错