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

ModuleNotFoundError: No module named 'detectron2.config' #4

Open
alexfredo opened this issue Dec 5, 2023 · 13 comments
Open

ModuleNotFoundError: No module named 'detectron2.config' #4

alexfredo opened this issue Dec 5, 2023 · 13 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@alexfredo
Copy link

Hi I have a error when I use the "py main.py" command, the error :

File "C:\vid2densepose\main.py", line 1, in
from detectron2.config import get_cfg
ModuleNotFoundError: No module named 'detectron2.config'

Please helps ! thanks

@igorriti
Copy link
Member

igorriti commented Dec 5, 2023

Did you do pip install -r requirements.txt ?

I would reccomend to use a WSL if you are on Windows.

@alexfredo
Copy link
Author

Yes I tried but I have a error when I pip install the requirement too :
ffferror

@Questscape
Copy link

I have same issue on windows 10 as alexfredo

@alexfredo
Copy link
Author

I have windows 10 too

@tadeodonegana
Copy link
Member

Have you cloned the Detectron repository?

Please use git clone https://github.com/facebookresearch/detectron2.git as specified in the readme.

@tadeodonegana tadeodonegana added the question Further information is requested label Dec 6, 2023
@Questscape
Copy link

Questscape commented Dec 6, 2023

yes i cloned and installed the detectron repo, installed it, now im getting:
Traceback (most recent call last): File "G:\magic_animate\magic-animate\video2dense\vid2densepose\app.py", line 7, in <module> from densepose import add_densepose_config ModuleNotFoundError: No module named 'densepose'

when installing densepose, i get this same error as above:
image

@igorriti
Copy link
Member

igorriti commented Dec 6, 2023

The issue lies with Windows, and while we are actively working on a solution, I would recommend utilizing Windows Subsystem for Linux (WSL) as a temporary workaround. You can easily download WSL from the Microsoft Store, and it functions seamlessly. I will also include this advice in the readme for your convenience.

@tadeodonegana tadeodonegana added the bug Something isn't working label Dec 6, 2023
@chen-rn
Copy link

chen-rn commented Dec 7, 2023

I'm on OSX Ventura and am running into the same issue as well.

Edit: creating a venv, then first installing pytorch+ torchvision before installing the requirement.txt resolved this.

@zono50
Copy link

zono50 commented Dec 7, 2023

I'm on linux, installed torch and torch vision, did pip install -r requirements.txt and then git clone of the detectron2 and getting no module named detectron2.config found

@igorriti
Copy link
Member

igorriti commented Dec 8, 2023

I cannot reproduce your problem @zono50 , could you provide us with more details? Which version of torch and torch vision did you have?

I suggest you to create a virtual env, git clone the detectron repo, then install the torch and torch vision(check the requirements.txt for the versions) and finally the pip install - r requirements.txt

@ljzm
Copy link

ljzm commented Dec 8, 2023

您是否克隆了 Detectron 存储库?

请按照自述文件中的规定使用。git clone https://github.com/facebookresearch/detectron2.git

请问这个仓库git clone下来应该放在哪个目录下,放在vid2densepose目录下吗,还是同级?期待答复。谢谢

@harpy2
Copy link

harpy2 commented Dec 10, 2023

!apt install -y nvidia-cuda-dev

@ml1969
Copy link

ml1969 commented Jan 15, 2024

Hi,
I trioed to install it under windows like @alexfredo and I got the same errormessage.
After that, I tried to use WSL with Ubuntu under Win11.
I´m a noob. I do not get it to work.
At first I realised that there are some packeges missing :(
At least I installed the wrong CUD Version, and so on.

I will try it on a fresh WSL installation,

For me the best solution will be, no erros under windows 👯

Regards
michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

9 participants