pkhungurn / talking-head-anime-demo

Demo for the "Talking Head Anime from a Single Image."
MIT License
1.99k stars 286 forks source link

Can not run any .py in /app #8

Open Cathgao opened 4 years ago

Cathgao commented 4 years ago
python app\manual_poser.py
Traceback (most recent call last):
  File "app\manual_poser.py", line 13, in <module>
    from poser.morph_rotate_combine_poser import MorphRotateCombinePoser256Param6
ModuleNotFoundError: No module named 'poser.morph_rotate_combine_poser'; 'poser' is not a package

I am using Python 3.6.8 , and I have installed all the dependencies including CUDA and cudnn

Requirement already satisfied: torch in c:\users\gaope\appdata\local\programs\python\python36\lib\site-packages (1.4.0)
Requirement already satisfied: dlib in c:\users\gaope\appdata\local\programs\python\python36\lib\site-packages (19.19.0)
Requirement already satisfied: opencv-python in c:\users\gaope\appdata\local\programs\python\python36\lib\site-packages (4.2.0.32)
Requirement already satisfied: numpy in c:\users\gaope\appdata\local\programs\python\python36\lib\site-packages (1.18.1)
Requirement already satisfied: pillow in c:\users\gaope\appdata\local\programs\python\python36\lib\site-packages (7.0.0)
Cathgao commented 4 years ago

I can run if I put all .py files into one folder and edit all path in every .py files

dragonmeteor commented 4 years ago

You might have another package called "poser" in your Python installation. Adding the project's directory to the PYTHONPATH environment variable variable before running "python app/manual_poser.py" might help.

https://stackoverflow.com/questions/54100236/absolute-import-results-in-modulenotfounderror

reimurin commented 4 years ago

I have set the PYTHONPATH environment variable, but I still cannot get the live2d presenting. What is the problem? By the way, python app/puppeteer.py this command also cannot present any results. Here’s the log: Exception in Tkinter callback Traceback (most recent call last): File "D:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\tkinter__init.py", line 1883, in call return self.func(args) File "D:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\tkinter__init__.py", line 804, in callit func(args) File "app/manual_poser.py", line 112, in update_image posed_image = self.poser.pose(self.source_image, self.current_pose).detach().cpu() File "D:\Downloads\talking-head-anime-demo-master\poser\morph_rotate_combine_poser.py", line 82, in pose combined_image = combine_module(rotated_images[0], rotated_images[1], rotate_params) File "D:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\nn\modules\module.py", line 532, in call__ result = self.forward(*input, *kwargs) File "D:\Downloads\talking-head-anime-demo-master\tha\combiner.py", line 42, in forward y = self.main_body(x) File "D:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\nn\modules\module.py", line 532, in call result = self.forward(input, **kwargs) File "D:\Downloads\talking-head-anime-demo-master\nn\u_net_module.py", line 61, in forward y = torch.cat([x, downward_outputs[i]], dim=1) RuntimeError: error in LoadLibraryA

发送自 Windows 10 版邮件应用

发件人: dragonmeteor 发送时间: 2020年2月4日 10:38 收件人: pkhungurn/talking-head-anime-demo 抄送: Subscribed 主题: Re: [pkhungurn/talking-head-anime-demo] Can not run any .py in /app(#8)

You might have another package called "poser" in your Python installation. Adding the project's directory to the PYTHONPATH environment variable variable before running "python app/manual_poser.py" might help. https://stackoverflow.com/questions/54100236/absolute-import-results-in-modulenotfounderror — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

dragonmeteor commented 4 years ago

@reimurin Your problem is a different one. @Cathgao's problem stems from some misconfiguration of the Python library. Yours seems to be related to the machine's configuration. Please try following my suggestion in your thread.

Cathgao commented 4 years ago

You might have another package called "poser" in your Python installation. Adding the project's directory to the PYTHONPATH environment variable variable before running "python app/manual_poser.py" might help.

https://stackoverflow.com/questions/54100236/absolute-import-results-in-modulenotfounderror

not only the "poser.py" but all the .py files in the other folders can not be loaded. It seems the path of the current working path does not work. I just put them all together and edit the path in .py files and they work fine.