您的位置:首页 > 科技 > IT业 > RegionClip环境安装踩坑指南

RegionClip环境安装踩坑指南

2024/10/6 20:31:02 来源:https://blog.csdn.net/qq_42693848/article/details/139860058  浏览:    关键词:RegionClip环境安装踩坑指南

RegionClip环境安装

  • RegionClip环境安装)
    • 问题:
    • 问题1
    • 问题2
    • 问题3
    • 问题4
    • 问题5

RegionClip环境安装)

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

问题:

问题:#error "You're trying to build PyTorch with a too old version of GCC. We need GCC 9 or later."
解决:先安装指定版本的pytorch,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

问题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

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com