-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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 tools" in my codebase imports detectron2's tools rather than my own library. #3934
Comments
You've chosen to report an unexpected problem or bug. Unless you already know the root cause of it, please include details about it by filling the issue template. |
Take https://github.com/numpy/numpy/tree/main/tools for example. It is not a wrong thing to have these directories. I think the problem is either because
In particular, it looks like |
We are installing via creating a wheel and then pip installing that wheel. |
Thanks for the info. I don't know there is such a file and it looks like a hack to me from the log. For Line 154 in 710e779
probably will fix it. |
Hi @ppwwyyxx , I'm pretty sure when I install |
…#979) Summary: Update the workaround to facebookresearch/detectron2#3934 Pull Request resolved: #979 Reviewed By: erichan1 Differential Revision: D37319582 Pulled By: xuzhao9 fbshipit-source-id: 468b9cdc9050e617312edb20f7bc0e4cc7446c25
@xwang233 I agree with you, and I think my comment above at #3934 (comment) will probably fix it |
It does not work |
you need to clean rebuild it, s.t. remove build and egg folder first. |
It's pretty common practice for pip libraries to put all their code inside a folder with the same name in order to namespace all packages to the outermost unique library name. In the detectron2 repo, there are a few folders that violate this, notably
tools
andprojects
. I would like to understand why they are set up this way rather than living inside thedetectron2
folder. Is there a way I can fix this by modifying the setup.py process? Or will I have to move or rename the folders in my fork and risk merge issues down the line?Instructions To Reproduce the Issue:
In my codebase
from tools import foo
Expected behavior:
Imports my script named
foo
living in<root>/tools/foo.py
Actual behavior
Python says
"foo" is an unknown symbol
Environment:
The text was updated successfully, but these errors were encountered: