Open JackLau1222 opened 6 months ago
确认一下,conda环境下的pip和系统pip是不是有些冲突
我使用的是官方提供的docker镜像 系统pip是镜像原来的python3.8附带的
root@bd912f7bf229:~/bmf# pip --version
pip 23.2.1 from /usr/local/lib/python3.8/dist-packages/pip (python 3.8)
虚拟环境的pip指向python3.9
(deoldify_py39) root@bd912f7bf229:~/bmf/bmf/demo/colorization_python# pip3 --version
pip 24.0 from /root/miniconda3/envs/deoldify_py39/lib/python3.9/site-packages/pip (python 3.9)
(deoldify_py39) root@bd912f7bf229:~/bmf/bmf/demo/colorization_python# pip --version
pip 24.0 from /root/miniconda3/envs/deoldify_py39/lib/python3.9/site-packages/pip (python 3.9)
我在另一台机器上再次尝试使用conda环境(系统python3.8可以正常跑demo),具体命令如下
327 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
328 ls
329 bash ./Miniconda3-latest-Linux-x86_64.sh
330 source ~/.bashrc
331 conda create -n deoldify_py39 python=3.9
332 conda activate deoldify_py39
333 cd bmf/bmf/demo/colorization_python/
334 ls
335 pip3 --version
336 pip3.9 list
337 pip --version
338 pip install ./DeOldify/requirements-colab.txt
339 pip install -r ./DeOldify/requirements-colab.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
340 pip3 list
341 pip install BabitMF BabitMF-GPU -i https://pypi.tuna.tsinghua.edu.cn/simple
342 ls
343 python3 --version
344 python3 deoldify_demo.py
依然是同样报错
(deoldify_py39) root@73559b1846e1:~/bmf/bmf/demo/colorization_python# python3 deoldify_demo.py
Traceback (most recent call last):
File "/root/bmf/bmf/demo/colorization_python/deoldify_demo.py", line 1, in <module>
import bmf
File "/root/bmf/output/bmf/__init__.py", line 3, in <module>
from bmf.python_sdk.module_functor import make_sync_func
File "/root/bmf/output/bmf/python_sdk/__init__.py", line 1, in <module>
from .module_functor import make_sync_func, ProcessDone
File "/root/bmf/output/bmf/python_sdk/module_functor.py", line 1, in <module>
import bmf.lib._hmp
ModuleNotFoundError: No module named 'bmf.lib._hmp'
(deoldify_py39) root@73559b1846e1:~/bmf/bmf/demo/colorization_python# python3 --version
Python 3.9.19
(deoldify_py39) root@73559b1846e1:~/bmf/bmf/demo/colorization_python# pip --version
pip 24.0 from /root/miniconda3/envs/deoldify_py39/lib/python3.9/site-packages/pip (python 3.9)
按照README.md 的引导 建立conda虚拟环境,下载完相关依赖运行demo后找不到hmp库
相关依赖下载无误
在硬盘中也能找到
_hmp.cpython-39-x86_64-linux-gnu.so
这个库文件