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

import faceswap issue #1

Open
wolu0901 opened this issue Mar 28, 2018 · 5 comments
Open

import faceswap issue #1

wolu0901 opened this issue Mar 28, 2018 · 5 comments

Comments

@wolu0901
Copy link

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?

@goberoi
Copy link
Owner

goberoi commented Mar 28, 2018

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

@wolu0901
Copy link
Author

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
Copy link
Author

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.

@SasiKiranK
Copy link

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

@tiantianwahaha
Copy link

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

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

4 participants