[import problems] Can't import detection manager
💡 Your Question
Hey, I have a problem with importing DetectionAnalysisManager after installing data-gradients .So it's present in my site-packages. I tried using different PYTHONPATHes but it doesn't help. And I get ModuleNotFoundError again.
from data_gradients.managers.detection_manager import DetectionAnalysisManager
And have an error
Traceback (most recent call last):
File "/home/user/data-gradients/data_gradients.py", line 1, in <module>
from data_gradients.managers.detection_manager import DetectionAnalysisManager
File "/home/user/data-gradients/data_gradients.py", line 1, in <module>
from data_gradients.managers.detection_manager import DetectionAnalysisManager
ModuleNotFoundError: No module named 'data_gradients.managers'; 'data_gradients' is not a package
python - 3.9.17. data-gradients - 0.1.4
How can this be resolved? Thanks
Versions
No response
Hi! The most simple way to go would be to check which python env is being used in your IDE (or the one you are using in the cmd line), and make sure you install DataGradients on that specific version.
If you installed from PyPi, just run again pip install but by specifying the whole path:
/<path-to>/python -m pip install data-gradients
If you cloned the repo: /<path-to>/python -m pip install .
Hoping this helps
@Louis-Dupont thanks, but this doesn't help.
I use conda env for it, and I don't have such a problem with other libraries. I've tried your suggestion, and have the same result as earlier.
@alexuvarovskyi Are you using this in a Google Colab notebook? Try to restart your runtime after installation and see if that helps
@alexuvarovskyi did restarting your runtime solve the issue?