Error message:
File "/home/miniconda3/envs/deva/lib/python3.9/site-packages/MultiScaleDeformableAttention-1.0-py3.9-linux-x86_64.egg/modules/__init__.py", line 12, in <module>
from .ms_deform_attn import MSDeformAttn
File "/home/miniconda3/envs/deva/lib/python3.9/site-packages/MultiScaleDeformableAttention-1.0-py3.9-linux-x86_64.egg/modules/ms_deform_attn.py", line 24, in <module>
from ..functions import MSDeformAttnFunction
ImportError: attempted relative import beyond top-level package
In most possible situation:
This project does not depend on multiscaledeformableattention
, but you have that installed in your global Python environment. The issue is evidently that that project is abominably mispackaged so it installs a Python package called modules, which conflicts with the modules package in this project.
If you used a separate venv, you wouldn’t have this problem with a globally installed conflicting dependency.
Your options are:
pip uninstall multiscaledeformableattention
(but I don’t know what other things you have installed that might depend on it) to get rid of the conflicting package in your install.
use a virtualenv