RegionClip环境安装踩坑指南

RegionClip环境安装

RegionClip环境安装)

复制代码
特别强调,不要单独去安装detectron2,会出现model.clip不存在的错误,通过python -m pip install -e RegionCLIP就可以

问题1

复制代码
问题:torch-cuda版本不一致无法通过
解决:pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113

问题2

复制代码
问题2: pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: 'RegionCLIP'
解决:降低setuptools版本 如:pip install setuptools==59.0.1 参考:https://github.com/microsoft/RegionCLIP/issues/60

问题3

复制代码
问题:torch版本和cuda版本不一致
解决:一起指定安装:pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113

问题4

复制代码
问题:KeyError: 'Non-existent config key: MODEL.CLIP'
解决:使用方法安装
git clone git@github.com:microsoft/RegionCLIP.git
python -m pip install -e RegionCLIP

问题5

复制代码
问题:AttributeError: module 'PIL.Image' has no attribute 'LINEAR'
解决:降低Pillow版本,如:pip install Pillow==8.4.0
相关推荐
離離原上譜1 小时前
python-docx 安装与快速入门
python·word·python-docx·自动化办公·1024程序员节
JuicyActiveGilbert1 小时前
【Python进阶】第2篇:单元测试
开发语言·windows·python·单元测试
今天没ID1 小时前
Numpy加权平均数
python
唐叔在学习1 小时前
200kb能作甚?mss表示我给你整个截图程序
后端·python
智能化咨询2 小时前
Python 小工具实战:图片水印批量添加工具——从原理到实现的全流程指南
python
用户3721574261352 小时前
如何使用 Python 自动调整 Excel 行高和列宽
python
用户8356290780512 小时前
用Python自动化转换PowerPoint幻灯片为图片
后端·python
程序员爱钓鱼2 小时前
Python编程实战 · 基础入门篇 | 推导式(列表推导式 / 字典推导式)
后端·python
小小测试开发2 小时前
Bokeh 库入门:用 Python 绘制交互式数据可视化图表
开发语言·python·信息可视化·bokeh