faceit
faceit copied to clipboard
import faceswap issue
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?
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
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.
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.
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
I added the sys path also. still i am unable to import the lib
Please comment
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