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 'modules' #198

Open
jeffrywu28 opened this issue Jun 3, 2020 · 46 comments
Open

ModuleNotFoundError: No module named 'modules' #198

jeffrywu28 opened this issue Jun 3, 2020 · 46 comments

Comments

@jeffrywu28
Copy link

Traceback (most recent call last):
File "afy/cam_fomm.py", line 175, in
from afy import predictor_local
File "C:\Users\MyComputer\avatarify\afy\predictor_local.py", line 4, in
from modules.keypoint_detector import KPDetector
ModuleNotFoundError: No module named 'modules'

@jamjs98764
Copy link

Same I got this as well. Seems like it is expecting a "modules" directory in avatarify/afy?

@GiuseppeGiacoppo
Copy link

Do you have fomm dir inside scripts dir? Try to move it to avatarify dir

@jeffrywu28
Copy link
Author

Do you have fomm dir inside scripts dir? Try to move it to avatarify dir

No i dont have

@GiuseppeGiacoppo
Copy link

Then I suppose you need to check why the script didn't download the fomm project. It's downloaded with git clone command in install script

@alievk
Copy link
Owner

alievk commented Jun 4, 2020

This issue usually arises from two things:

  1. You didn't install git.
  2. You installed git but Anaconda prompt can't find it for some reason. Try to run gitin the prompt to find this out.

@jamjs98764
Copy link

My Anaconda environment is able to find git so I am not sure why it isnt working. There doesnt seem to be the "fomm" directory in the master branch as well. Is that a potential reason?

@jeffrywu28
Copy link
Author

Here my capture...
Untitled

@jeffrywu28
Copy link
Author

This issue usually arises from two things:

  1. You didn't install git.
  2. You installed git but Anaconda prompt can't find it for some reason. Try to run gitin the prompt to find this out.

i have re-install avatarify 3 times, in windows 2 times with same error. the last one i install it at my linux (first try it can run, but second try they are error with different line)

@Yorktech
Copy link

Yorktech commented Jun 4, 2020

I had this error, so I reran a clean install and then I had the yaml module not found error
I ran these commands
pip install pyyaml
pip install requests
pip install cv2
pip install scipy
pip install face_alignment
pip install sklearn
pip install pandas
I also copied the 7 files from the modules folder into the fomm folder.

This now works

@jamjs98764
Copy link

After running "scripts/install_windows.bat", my avatarify virtual env loses git. And I see the following conflicting messages. I think the .bat file recreates the avatarify virtual env without git so git clone fails. Anyway I can go around this?

image

I've tried copying the modules files from https://github.com/AliaksandrSiarohin/first-order-model but his version of OcclusionAwareGenerator does not have "encode_source".

@sudoRhaToyz
Copy link

please help me out
i am having issue running avatarify

Traceback (most recent call last):
File "afy/cam_fomm.py", line 4 in
import yaml
ModuleNotFoundError: No module named 'yaml'

@jamjs98764
Copy link

please help me out
i am having issue running avatarify

Traceback (most recent call last): File "afy/cam_fomm.py", line 4 in import yaml ModuleNotFoundError: No module named 'yaml'

You can check whether your git is installed properly noting that the .bat files are creating a virtual environment. In my case, all virtual environments don't come with git by default. So I had to open the .bat files as text and added "conda install -c anaconda git" after "conda activate avatarify"

@sudoRhaToyz
Copy link

please help me out
i am having issue running avatarify
Traceback (most recent call last): File "afy/cam_fomm.py", line 4 in import yaml ModuleNotFoundError: No module named 'yaml'

You can check whether your git is installed properly noting that the .bat files are creating a virtual environment. In my case, all virtual environments don't come with git by default. So I had to open the .bat files as text and added "conda install -c anaconda git" after "conda activate avatarify"

@jamjs98764 thanks so much for replying but i have tried again but still same issue

@vuexiaob
Copy link

modules在fomm文件夹中,可以把整个modules文件拷贝到afy文件夹即可

@PuvShur
Copy link

PuvShur commented Jan 3, 2021

hello after fixing all these bugs
I got another
" File "afy/cam_fomm.py", line 75, in load_images
if img.ndim == 2:
AttributeError: 'NoneType' object has no attribute 'ndim'"
can anyone help me

@JohanAR
Copy link
Collaborator

JohanAR commented Jan 13, 2021

@PuvShur how did you fix this error, i.e. "No module named 'modules'"? I'm trying to figure out if this still exists or if it can be closed. Regarding your new error, I guess you might have a broken image in the avatars folder. I'm adding a check to the code so that it doesn't crash when this happens #345

@PuvShur
Copy link

PuvShur commented Jan 13, 2021

@JohanAR, when installing avatarify, I downloaded something to the fomm folder, I created a modules folder in the C: \ Users \ **** \ miniconda3 directory and copied this folder and its contents there

@Erik1346
Copy link

Erik1346 commented Sep 5, 2022

I have an issue no module name request I don't know how to fix it

@vuexiaob

This comment was marked as spam.

@gjshegz1
Copy link

Pip cv2 refused to install

@vuexiaob

This comment was marked as spam.

@gjshegz1
Copy link

gjshegz1 commented Dec 16, 2022 via email

@badmuspro
Copy link

E8B625E1-06A5-46C4-A67E-5110616C974B
This is what I got when I run_windows.bat please help

@nuelljune
Copy link

E8B625E1-06A5-46C4-A67E-5110616C974B This is what I got when I run_windows.bat please help

did you get help for this? im also stuck here

@vuexiaob
Copy link

vuexiaob commented Feb 1, 2023 via email

@goldddd244
Copy link

hello,
pls am stuck here
(avatarify) C:\Users\HP\avatarify-python>run_windows.bat
[1675832575.880838] Loading Predictor
Traceback (most recent call last):
File "afy/cam_fomm.py", line 216, in
from afy import predictor_local
File "C:\Users\HP\avatarify-python\afy\predictor_local.py", line 4, in
from modules.keypoint_detector import KPDetect

@gjshegz1
Copy link

Just start over with this method https://github.com/technopremium/avatarify-python-youtube/blob/master/README.md

if it works please let me know

@Timily01
Copy link

Someone should assist me pls...no module named modules found
IMG_20230211_180701_7

@danzil676
Copy link

I had this error, so I reran a clean install and then I had the yaml module not found error I ran these commands pip install pyyaml pip install requests pip install cv2 pip install scipy pip install face_alignment pip install sklearn pip install pandas I also copied the 7 files from the modules folder into the fomm folder.

This now works

decided to try this solution and got to install cv2 but keep showing this below

(avatarify) C:\Users\PHAVOUR OTF\avatarify-python>pip install cv2
ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)
ERROR: No matching distribution found for cv2

did you specify any version when installing cv2?

@vuexiaob
Copy link

vuexiaob commented Apr 8, 2023 via email

@danzil676
Copy link

modules在fomm文件夹中,可以把整个modules文件拷贝到afy文件夹即可

找不到 fomm 文件夹或模块,我知道这是因为 scripts\run_windows.bat 没有下载到最后,我该如何纠正? 请需要一些帮助

@lewis30adams
Copy link

having same issues here

@vuexiaob
Copy link

vuexiaob commented May 2, 2023 via email

@lewis30adams
Copy link

ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)
ERROR: No matching distribution found for cv2

@lewis30adams
Copy link

@vuexiaob i cant understand you, could you help me with translation

@JohanAR
Copy link
Collaborator

JohanAR commented May 2, 2023

@lewis30adams I put it into google translate, appears to be some kind of auto-reply just saying the message has been received.

@lewis30adams
Copy link

lewis30adams commented May 2, 2023 via email

@iam6ix
Copy link

iam6ix commented May 15, 2023

1684165291.497923] Loading Predictor
Traceback (most recent call last):
File "afy/cam_fomm.py", line 216, in
from afy import predictor_local
File "C:\Users\user\avatarify-python\afy\predictor_local.py", line 4, in
from modules.keypoint_detector import KPDetector
ModuleNotFoundError: No module named 'modules'

please do something about this

@emmaezeiru
Copy link

where did you get the modules files

@vuexiaob
Copy link

vuexiaob commented May 30, 2023 via email

@abc906093117
Copy link

I found the reason why, it's because the scripts/install_windows.bat file was not executed successfully. Please go to the 'avatarify-python' directory and execute the git command 'git clone https://github.com/alievk/first-order-model.git fomm' to solve the problem. Please note that my installation method mainly refers to #573
image

@vuexiaob
Copy link

vuexiaob commented Jun 24, 2023 via email

@tobatosin
Copy link

File "cam_fomm.py", line 16, in
import normalize_kp
ModuleNotFoundError: No module named 'normalize_kp'

pls how do i solve this

@vuexiaob
Copy link

vuexiaob commented Sep 10, 2023 via email

@SanPatrick01
Copy link

Type in English... church YouTube for my video

@Brownlyn-Codelabs
Copy link

Get your installation, easy step by step tutorial here.
anyDesk or come in person.
call 0552366834 or whatsapp.
Thank you.
avatarify, DeepFake, Voice cloning. all here.

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