Page 1 of 1

Faceswap Missing Module Error

Posted: Wed Aug 26, 2020 5:54 pm
by DrDreGFunk

Hi, this is probably a simple fix as I am very new to this, but I'm having a tough time getting around this error for a while. It says "ModuleNotFoundError: No module named 'plugins.convert.color.'" I'm trying to extract faces for a comedic TikTok project, but it was working before and then reset itself somehow, I have no idea. My OS is High Sierra and would appreciate any help!

I followed this tutorial to get it working the first time:
https://medium.com/@oliverlardner/tutor ... 5eb8069a16

Here's a full screenshot of the error:


Re: Faceswap Missing Module Error

Posted: Wed Aug 26, 2020 6:08 pm
by torzdf

Yeah, don't follow that guide. It is hideously outdated and (as you have discovered) won't work.

Follow the manual install instructions here:
https://github.com/deepfakes/faceswap/b ... al-install

They are for Windows, but the process will be the same for macOS


Re: Faceswap Missing Module Error

Posted: Wed Aug 26, 2020 7:55 pm
by DrDreGFunk

Thank you, I will give it a shot later. So is there an easy way to start again as I don't know if I've messed up and need to uninstall any unwanted stuff and clean up any errors?


Re: Faceswap Missing Module Error

Posted: Thu Aug 27, 2020 8:33 am
by torzdf

Honestly? I don't know.

My advise would be go through those steps again backwards to remove everything that you installed before.


Re: Faceswap Missing Module Error

Posted: Wed Sep 02, 2020 8:41 pm
by DrDreGFunk
torzdf wrote: Thu Aug 27, 2020 8:33 am

Honestly? I don't know.

My advise would be go through those steps again backwards to remove everything that you installed before.

I've attempted to re-download everything through your recommended tutorial and ran

Code: Select all

python setup.py

but get an error with pynvx. Been searching a while for a solution, but I don't understand the issue properly as I'm new to this. I tried this

Code: Select all

pip install pynvx

but yeah, this is the error message I recieve:

Code: Select all

Last login: Wed Sep  2 21:14:01 on ttys000
You have mail.
. /Users/name/opt/anaconda3/bin/activate && conda activate /Users/name/opt/anaconda3/envs/faceswap; 
(base) name-MacBook-Pro-4:~ name$ . /Users/name/opt/anaconda3/bin/activate && conda activate /Users/name/opt/anaconda3/envs/faceswap; 
(faceswap) name-MacBook-Pro-4:~ name$ pip install pynvx
Collecting pynvx
  Downloading pynvx-1.0.0.tar.gz (150 kB)
     |████████████████████████████████| 150 kB 748 kB/s 
Building wheels for collected packages: pynvx
  Building wheel for pynvx (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/name/opt/anaconda3/envs/faceswap/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/setup.py'"'"'; __file__='"'"'/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-wheel-rf677cft
       cwd: /private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/
  Complete output (68 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-x86_64-3.8
  creating build/lib.macosx-10.9-x86_64-3.8/pynvx
  copying pynvx/pynvml.py -> build/lib.macosx-10.9-x86_64-3.8/pynvx
  copying pynvx/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/pynvx
  running build_ext
  -- The C compiler identification is AppleClang 10.0.0.10001044
  -- The CXX compiler identification is AppleClang 10.0.0.10001044
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Found PythonInterp: /Users/name/opt/anaconda3/envs/faceswap/bin/python (found version "3.8.5")
  -- Found PythonLibs: /Users/name/opt/anaconda3/envs/faceswap/lib/libpython3.8.dylib
  -- Performing Test HAS_CPP14_FLAG
  -- Performing Test HAS_CPP14_FLAG - Success
  -- pybind11 v2.3.dev0
  -- Performing Test HAS_FLTO
  -- Performing Test HAS_FLTO - Success
  -- LTO enabled
  CMake Error at /usr/local/Cellar/cmake/3.18.2/share/cmake/Modules/FindCUDA.cmake:716 (message):
    Specify CUDA_TOOLKIT_ROOT_DIR
  Call Stack (most recent call first):
    CMakeLists.txt:8 (find_package)
  

-- Configuring incomplete, errors occurred! See also "/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/build/temp.macosx-10.9-x86_64-3.8/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/setup.py", line 68, in <module> setup( File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/site-packages/setuptools/__init__.py", line 163, in setup return distutils.core.setup(**attrs) File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 290, in run self.run_command('build') File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/setup.py", line 32, in run self.build_extension(ext) File "/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/setup.py", line 56, in build_extension subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env) File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/build/lib.macosx-10.9-x86_64-3.8', '-DPYTHON_EXECUTABLE=/Users/name/opt/anaconda3/envs/faceswap/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- ERROR: Failed building wheel for pynvx Running setup.py clean for pynvx Failed to build pynvx DEPRECATION: Could not build wheels for pynvx which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368. Installing collected packages: pynvx Running setup.py install for pynvx ... error ERROR: Command errored out with exit status 1: command: /Users/name/opt/anaconda3/envs/faceswap/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/setup.py'"'"'; __file__='"'"'/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-record-jndt7ty4/install-record.txt --single-version-externally-managed --compile --install-headers /Users/name/opt/anaconda3/envs/faceswap/include/python3.8/pynvx cwd: /private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/ Complete output (70 lines): running install running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.8 creating build/lib.macosx-10.9-x86_64-3.8/pynvx copying pynvx/pynvml.py -> build/lib.macosx-10.9-x86_64-3.8/pynvx copying pynvx/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/pynvx running build_ext -- The C compiler identification is AppleClang 10.0.0.10001044 -- The CXX compiler identification is AppleClang 10.0.0.10001044 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonInterp: /Users/name/opt/anaconda3/envs/faceswap/bin/python (found version "3.8.5") -- Found PythonLibs: /Users/name/opt/anaconda3/envs/faceswap/lib/libpython3.8.dylib -- Performing Test HAS_CPP14_FLAG -- Performing Test HAS_CPP14_FLAG - Success -- pybind11 v2.3.dev0 -- Performing Test HAS_FLTO -- Performing Test HAS_FLTO - Success -- LTO enabled CMake Error at /usr/local/Cellar/cmake/3.18.2/share/cmake/Modules/FindCUDA.cmake:716 (message): Specify CUDA_TOOLKIT_ROOT_DIR Call Stack (most recent call first): CMakeLists.txt:8 (find_package)
-- Configuring incomplete, errors occurred! See also "/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/build/temp.macosx-10.9-x86_64-3.8/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/setup.py", line 68, in <module> setup( File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/site-packages/setuptools/__init__.py", line 163, in setup return distutils.core.setup(**attrs) File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/command/install.py", line 545, in run self.run_command('build') File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/setup.py", line 32, in run self.build_extension(ext) File "/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/setup.py", line 56, in build_extension subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env) File "/Users/name/opt/anaconda3/envs/faceswap/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/build/lib.macosx-10.9-x86_64-3.8', '-DPYTHON_EXECUTABLE=/Users/name/opt/anaconda3/envs/faceswap/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/name/opt/anaconda3/envs/faceswap/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/setup.py'"'"'; __file__='"'"'/private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-install-o8dl14o2/pynvx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/kb/m279k9w953b0xj9btlyxf3d80000gn/T/pip-record-jndt7ty4/install-record.txt --single-version-externally-managed --compile --install-headers /Users/name/opt/anaconda3/envs/faceswap/include/python3.8/pynvx Check the logs for full command output. (faceswap) name-MacBook-Pro-4:~ name$

Re: Faceswap Missing Module Error

Posted: Thu Sep 03, 2020 9:45 pm
by torzdf

It seems pynvx is not out for Python 3.8.

When setting up the Anaconda environment, try setting it to Python 3.7 and see if that works.