Resolved https://github.com/openai/CLIP.git to commit a1d071733d7111c9c014f024669f959182114e33
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
Traceback (most recent call last):
File "D:\Code\python\ai_service\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module>
main()
File "D:\Code\python\ai_service\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Code\python\ai_service\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 143, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-3ufymeq5\overlay\Lib\site-packages\setuptools\build_meta.py", line 333, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-3ufymeq5\overlay\Lib\site-packages\setuptools\build_meta.py", line 301, in _get_build_requires
self.run_setup()
File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-3ufymeq5\overlay\Lib\site-packages\setuptools\build_meta.py", line 520, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-3ufymeq5\overlay\Lib\site-packages\setuptools\build_meta.py", line 317, in run_setup
exec(code, locals())
File "<string>", line 3, in <module>
ModuleNotFoundError: No module named 'pkg_resources'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed to build 'CLIP' when getting requirements to build wheel
花费了一定的时间查询AI,得到的结果是setuptools版本过高(没有pkg_resources),安装失败,需要降版本安装。但是还是失败了,我放弃了这一方法。
此前我尝试使用 git+https://github.com/CASIA-IVA-Lab/FastSAM.git 直接安装FastSAM,但是失败了.
花费了一定的时间查询AI,得到的结果是setuptools版本过高(没有pkg_resources),安装失败,需要降版本安装。但是还是失败了,我放弃了这一方法。
我直接使用 git+https://github.com/openai/CLIP.git 安装CLIP是成功的,所以一开始没有认为是CLIP的问题。因为个人水平有限,花费了相当的时间才理解“通过setup.py进行相关依赖的安装”,而当前FastSAM的setup.py所指定的CLIP依赖版本,其setup.py使用了pkg_resources,所以才安装失败。
请问是否考虑将setup.py中对于CLIP的版本指定去除?