Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[import problems] Can't import detection manager #169

Open
alexuvarovskyi opened this issue Jul 19, 2023 · 4 comments
Open

[import problems] Can't import detection manager #169

alexuvarovskyi opened this issue Jul 19, 2023 · 4 comments

Comments

@alexuvarovskyi
Copy link

💡 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

@alexuvarovskyi alexuvarovskyi changed the title Can't import detection manager [import problems] Can't import detection manager Jul 19, 2023
@Louis-Dupont
Copy link
Contributor

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

@alexuvarovskyi
Copy link
Author

@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.
Screenshot from 2023-07-19 17-55-39

@harpreetsahota204
Copy link

@alexuvarovskyi Are you using this in a Google Colab notebook? Try to restart your runtime after installation and see if that helps

@Louis-Dupont
Copy link
Contributor

@alexuvarovskyi did restarting your runtime solve the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants