YuvalNirkin / face_swap

End-to-end, automatic face swapping pipeline
GNU General Public License v3.0
825 stars 203 forks source link

"No module named face_swap_py", when I use python interface #31

Closed hao-qiang closed 6 years ago

hao-qiang commented 6 years ago

Hello Yuval, You do an excellent job in face swap. And I have a question when invoking python interface after compiling.

import face_swap_py as fspy

I do this at the path of 'face_swap_py.pyd' but it report error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named face_swap_py

It also doesn't work after adding "export PYTHONPATH=/home/hq/project/face_swap_YuvalNirkin/interfaces/python:$PYTHONPATH" in "~/.bashrc" file.

Could you give me some advices, thanks a lot. Johnson

YuvalNirkin commented 6 years ago

Hello Johnson, There was a bug with the python binding in Linux (a native module can only be loaded if it has the extension ".so"). It's fixed now, please git pull the changes and rebuild.

Also I changed the recommended way to install the library on Ubuntu:

I have updated the Ubuntu installation guide with those changes.

Let me know if it works for you now.

Thanks for helping me find this bug, Yuval

hao-qiang commented 6 years ago

Thanks a lot, it works very well. : )