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

[doc] Check and raise an error if the user is running Python from the parent directory of the sam2 repo #359

Merged

Conversation

ronghanghu
Copy link
Contributor

@ronghanghu ronghanghu commented Oct 5, 2024

If the user has "sam2/sam2" in their path, they are likey importing the repo itself as "sam2" rather than importing the "sam2" python package (i.e. "sam2/sam2" directory). This typically happens because the user is running Python from the parent directory that contains the sam2 repo they cloned.

In general, the user should not run Python from the parent dir when the repo is cloned into (same is true for e.g. Numpy repo that contains names like numpy/numpy where the module and the repo have the same name), as the user encountered in #346.

(close #346)

@ronghanghu ronghanghu force-pushed the ronghanghu/print_error_when_running_from_repo_parent_dir branch 3 times, most recently from 623311c to 2f35683 Compare October 5, 2024 07:12
@ronghanghu ronghanghu force-pushed the ronghanghu/print_error_when_running_from_repo_parent_dir branch 2 times, most recently from 309a261 to 76ea2e0 Compare October 5, 2024 07:26
… parent directory of the sam2 repo

If the user has "sam2/sam2" in their path, they are likey importing the repo itself as "sam2" rather than importing the "sam2" python package (i.e. "sam2/sam2" directory). This typically happens because the user is running Python from the parent directory that contains the sam2 repo they cloned.

In general, the user should not run Python from the parent dir when the repo is cloned into (same is true for e.g. Numpy repo that contains names like `numpy/numpy` where the module and the repo have the same name.
@ronghanghu ronghanghu force-pushed the ronghanghu/print_error_when_running_from_repo_parent_dir branch from 76ea2e0 to e06b028 Compare October 5, 2024 07:27
@ronghanghu ronghanghu merged commit 29267c8 into main Oct 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hydra not initializing - nested files causing install issue
3 participants