faceit icon indicating copy to clipboard operation
faceit copied to clipboard

import faceswap issue

Open wolu0901 opened this issue 6 years ago • 5 comments

When I run the faceit.py, it says

No module named 'lib.utils'

I tried to change the sys.path.append(‘’) to my path but it still doesn’t work. Do you mind showing me how you make it work or where do I make it wrong?

wolu0901 avatar Mar 28 '18 22:03 wolu0901

Ah gotcha. I think the issue is that the faceswap submodule has not been pulled in. To make that happen try this. Please respond back to let us know if it worked or if you continue to get errors.

cd faceit
git submodule update --init --recursive

goberoi avatar Mar 28 '18 22:03 goberoi

It doesn't work....

from lib.utils import FullHelpArgumentParser ModuleNotFoundError: No module named 'lib.utils'

I tried to clone a now one, git submodule and even create the init.py myself, but it doesn't work either. I think I may miss some process.

wolu0901 avatar Mar 29 '18 14:03 wolu0901

I got it!!! I think this happens because I have other sys.path which happens to start as lib so I need to put my path first.

rootpath=str(r'C:\Users\Python\faceit2\faceit\faceswap') syspath=sys.path sys.path=[] sys.path.append(rootpath)# sys.path.extend([rootpath+i for i in os.listdir(rootpath) if i[0]!="."])# sys.path.extend(syspath)

Happy morning.

wolu0901 avatar Mar 29 '18 15:03 wolu0901

root@Kumar:/var/www/html/hak/faceit# python faceit.py ['/var/www/html/hak/faceit/faceswap', '/var/www/html/hak/faceit', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/root/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages'] Traceback (most recent call last): File "faceit.py", line 32, in from lib.utils import FullHelpArgumentParser ImportError: cannot import name FullHelpArgumentParser

I added the sys path also. still i am unable to import the lib

Please comment

SasiKiranK avatar Jun 29 '19 07:06 SasiKiranK

root@Kumar:/var/www/html/hak/faceit# python faceit.py ['/var/www/html/hak/faceit/faceswap', '/var/www/html/hak/faceit', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/root/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages'] Traceback (most recent call last): File "faceit.py", line 32, in from lib.utils import FullHelpArgumentParser ImportError: cannot import name FullHelpArgumentParser

I added the sys path also. still i am unable to import the lib

Please comment

I think you need the correct version faceswap, not the latest version

tiantianwahaha avatar Jul 01 '19 09:07 tiantianwahaha