avatarify-python icon indicating copy to clipboard operation
avatarify-python copied to clipboard

ModuleNotFoundError: No module named 'modules'

Open jeffrywu28 opened this issue 5 years ago • 46 comments

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'

jeffrywu28 avatar Jun 03 '20 16:06 jeffrywu28

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

jamjs98764 avatar Jun 04 '20 05:06 jamjs98764

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

GiuseppeGiacoppo avatar Jun 04 '20 10:06 GiuseppeGiacoppo

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

No i dont have

jeffrywu28 avatar Jun 04 '20 12:06 jeffrywu28

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

GiuseppeGiacoppo avatar Jun 04 '20 12:06 GiuseppeGiacoppo

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.

alievk avatar Jun 04 '20 12:06 alievk

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?

jamjs98764 avatar Jun 04 '20 13:06 jamjs98764

Here my capture... Untitled

jeffrywu28 avatar Jun 04 '20 13:06 jeffrywu28

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)

jeffrywu28 avatar Jun 04 '20 13:06 jeffrywu28

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

Yorktech avatar Jun 04 '20 21:06 Yorktech

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".

jamjs98764 avatar Jun 05 '20 04:06 jamjs98764

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'

sudoRhaToyz avatar Jun 07 '20 14:06 sudoRhaToyz

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 avatar Jun 08 '20 03:06 jamjs98764

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

sudoRhaToyz avatar Jun 08 '20 09:06 sudoRhaToyz

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

vuexiaob avatar Aug 28 '20 01:08 vuexiaob

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

PuvShur avatar Jan 03 '21 19:01 PuvShur

@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

JohanAR avatar Jan 13 '21 10:01 JohanAR

@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

PuvShur avatar Jan 13 '21 10:01 PuvShur

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

Erik1346 avatar Sep 05 '22 05:09 Erik1346

您好,您的来信已收到,谢谢!

vuexiaob avatar Sep 05 '22 05:09 vuexiaob

Pip cv2 refused to install

gjshegz1 avatar Dec 16 '22 15:12 gjshegz1

您好,您的来信已收到,谢谢!

vuexiaob avatar Dec 16 '22 15:12 vuexiaob

Please how do I fix this On Fri, Dec 16, 2022 at 4:40 PM vuexiaob @.***> wrote:

您好,您的来信已收到,谢谢!

— Reply to this email directly, view it on GitHub https://github.com/alievk/avatarify-python/issues/198#issuecomment-1355098820, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4ZE6BCWFNW4T35EP635UPTWNSENHANCNFSM4NR2Q5SA . You are receiving this because you commented.Message ID: @.***>

gjshegz1 avatar Dec 16 '22 15:12 gjshegz1

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

badmuspro avatar Dec 21 '22 08:12 badmuspro

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

nuelljune avatar Feb 01 '23 20:02 nuelljune

您好,您的来信已收到,谢谢!

vuexiaob avatar Feb 01 '23 20:02 vuexiaob

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

goldddd244 avatar Feb 08 '23 05:02 goldddd244

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

if it works please let me know

gjshegz1 avatar Feb 10 '23 20:02 gjshegz1

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

Timily01 avatar Feb 11 '23 18:02 Timily01

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?

danzil676 avatar Apr 08 '23 10:04 danzil676

您好,您的来信已收到,谢谢!

vuexiaob avatar Apr 08 '23 10:04 vuexiaob