deepfakes / faceswap

Deepfakes Software For All
https://www.faceswap.dev
GNU General Public License v3.0
52.05k stars 13.18k forks source link

ModuleNotFoundError: No module named 'pyparsing' #1389

Closed darkside369 closed 4 months ago

darkside369 commented 4 months ago

Setting Faceswap backend to CPU 05/17/2024 03:54:53 INFO Log level set to: INFO 05/17/2024 03:54:57 ERROR Got Exception on main handler: Traceback (most recent call last): File "/home/grogu/faceswap/lib/cli/launcher.py", line 223, in execute_script script = self._import_script() File "/home/grogu/faceswap/lib/cli/launcher.py", line 53, in _import_script module = import_module(mod) File "/home/grogu/miniconda3/envs/faceswap/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/grogu/faceswap/scripts/gui.py", line 9, in from lib.gui import (TaskBar, CliOptions, CommandNotebook, ConsoleOut, DisplayNotebook, File "/home/grogu/faceswap/lib/gui/init.py", line 4, in from lib.gui.command import CommandNotebook File "/home/grogu/faceswap/lib/gui/command.py", line 9, in from .control_helper import ControlPanel File "/home/grogu/faceswap/lib/gui/control_helper.py", line 15, in from .custom_widgets import ContextMenu, MultiOption, ToggledFrame, Tooltip File "/home/grogu/faceswap/lib/gui/custom_widgets.py", line 14, in from .utils import get_config File "/home/grogu/faceswap/lib/gui/utils/init.py", line 4, in from .config import get_config, initialize_config, PATHCACHE File "/home/grogu/faceswap/lib/gui/utils/config.py", line 12, in from lib.gui._config import Config as UserConfig File "/home/grogu/faceswap/lib/gui/_config.py", line 8, in from matplotlib import font_manager File "/home/grogu/.local/lib/python3.10/site-packages/matplotlib/init.py", line 159, in from . import _api, _version, cbook, _docstring, rcsetup File "/home/grogu/.local/lib/python3.10/site-packages/matplotlib/rcsetup.py", line 29, in from matplotlib._fontconfig_pattern import parse_fontconfig_pattern File "/home/grogu/.local/lib/python3.10/site-packages/matplotlib/_fontconfig_pattern.py", line 15, in from pyparsing import ( ModuleNotFoundError: No module named 'pyparsing' 05/17/2024 03:54:57 CRITICAL An unexpected crash has occurred. Crash report written to '/home/grogu/faceswap/crash_report.2024.05.17.035455342092.log'. You MUST provide this file if seeking assistance. Please verify you are running the latest version of faceswap before reporting

torzdf commented 4 months ago

05/17/2024 03:54:57 CRITICAL An unexpected crash has occurred. Crash report written to '/home/grogu/faceswap/crash_report.2024.05.17.035455342092.log'. You MUST provide this file if seeking assistance. Please verify you are running the latest version of faceswap before reporting

I will reopen this issue if/when you provide the file as instructed.

darkside369 commented 4 months ago

my bad, here.

**05/17/2024 03:54:53 MainProcess MainThread logger log_setup INFO Log level set to: INFO 05/17/2024 03:54:53 MainProcess MainThread launcher _set_environment_variables DEBUG Setting TF_RUN_EAGER_OP_AS_FUNCTION env var to False 05/17/2024 03:54:54 MainProcess MainThread tpu_cluster_resolver DEBUG Falling back to TensorFlow client; we recommended you install the Cloud TPU client directly with pip install cloud-tpu-client. 05/17/2024 03:54:54 MainProcess MainThread init DEBUG Creating converter from 7 to 5 05/17/2024 03:54:54 MainProcess MainThread init DEBUG Creating converter from 5 to 7 05/17/2024 03:54:54 MainProcess MainThread init DEBUG Creating converter from 7 to 5 05/17/2024 03:54:54 MainProcess MainThread init DEBUG Creating converter from 5 to 7 05/17/2024 03:54:55 MainProcess MainThread launcher _test_for_tf_version DEBUG Installed Tensorflow Version: (2, 10) Traceback (most recent call last): File "/home/grogu/faceswap/lib/cli/launcher.py", line 223, in execute_script script = self._import_script() File "/home/grogu/faceswap/lib/cli/launcher.py", line 53, in _import_script module = import_module(mod) File "/home/grogu/miniconda3/envs/faceswap/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/grogu/faceswap/scripts/gui.py", line 9, in from lib.gui import (TaskBar, CliOptions, CommandNotebook, ConsoleOut, DisplayNotebook, File "/home/grogu/faceswap/lib/gui/init.py", line 4, in from lib.gui.command import CommandNotebook File "/home/grogu/faceswap/lib/gui/command.py", line 9, in from .control_helper import ControlPanel File "/home/grogu/faceswap/lib/gui/control_helper.py", line 15, in from .custom_widgets import ContextMenu, MultiOption, ToggledFrame, Tooltip File "/home/grogu/faceswap/lib/gui/custom_widgets.py", line 14, in from .utils import get_config File "/home/grogu/faceswap/lib/gui/utils/init.py", line 4, in from .config import get_config, initialize_config, PATHCACHE File "/home/grogu/faceswap/lib/gui/utils/config.py", line 12, in from lib.gui._config import Config as UserConfig File "/home/grogu/faceswap/lib/gui/_config.py", line 8, in from matplotlib import font_manager File "/home/grogu/.local/lib/python3.10/site-packages/matplotlib/init.py", line 159, in from . import _api, _version, cbook, _docstring, rcsetup File "/home/grogu/.local/lib/python3.10/site-packages/matplotlib/rcsetup.py", line 29, in from matplotlib._fontconfig_pattern import parse_fontconfig_pattern File "/home/grogu/.local/lib/python3.10/site-packages/matplotlib/_fontconfig_pattern.py", line 15, in from pyparsing import ( ModuleNotFoundError: No module named 'pyparsing'

============ System Information ============ backend: cpu encoding: UTF-8 git_branch: master git_commits: 8c3bc39 bugfix: Patch writer. Correctly split frame number from the end of filenames gpu_cuda: No global version found. Check Conda packages for Conda Cuda gpu_cudnn: No global version found. Check Conda packages for Conda cuDNN gpu_devices:
gpu_devices_active:
gpu_driver:
gpu_vram:
os_machine: x86_64 os_platform: Linux-5.15.0-105-generic-x86_64-with-glibc2.35 os_release: 5.15.0-105-generic py_command: /home/grogu/faceswap/faceswap.py gui py_conda_version: conda 24.3.0 py_implementation: CPython py_version: 3.10.13 py_virtual_env: True sys_cores: 8 sys_processor: x86_64 sys_ram: Total: 7827MB, Available: 4430MB, Used: 2460MB, Free: 434MB

=============== Pip Packages =============== absl-py==2.1.0 addict==2.4.0 aenum==2.2.6 aiodns==3.1.1 aiohttp==3.9.3 aiosignal==1.3.1 albumentations==1.3.1 annotated-types==0.6.0 anyio==4.3.0 astunparse==1.6.3 attrs==19.1.0 basicsr==1.4.2 beautifulsoup4==4.11.1 blinker==1.7.0 cachetools==5.3.3 certifi==2024.2.2 cffi==1.16.0 charset-normalizer==2.0.12 click==8.1.7 coloredlogs==15.0.1 contourpy==1.2.1 customtkinter==5.2.0 cycler==0.12.1 Cython==3.0.10 darkdetect==0.8.0 distro==1.9.0 docstring-parser==0.15 easydict==1.13 exceptiongroup==1.2.0 facexlib==0.3.0 fastcluster @ file:///home/conda/feedstock_root/build_artifacts/fastcluster_1695649830516/work fbchat==1.9.7 ffmpy @ file:///home/conda/feedstock_root/build_artifacts/ffmpy_1659474992694/work filterpy==1.4.5 Flask==3.0.2 flatbuffers==24.3.25 fonttools==4.51.0 frozenlist==1.4.1 fsspec==2024.5.0 future==1.0.0 gast==0.4.0 gdown==5.2.0 gfpgan==1.3.8 google-auth==2.29.0 google-auth-oauthlib==0.4.6 google-pasta==0.2.0 grpcio==1.63.0 h11==0.14.0 h5py==3.11.0 httpcore==1.0.4 httpx==0.27.0 humanfriendly==10.0 idna==3.7 imageio==2.34.1 imageio-ffmpeg==0.4.9 importlib_metadata==7.1.0 insightface==0.7.3 instructor==0.6.1 itsdangerous==2.1.2 Jinja2==3.1.3 joblib==1.4.2 keras==2.10.0 Keras-Preprocessing==1.1.2 kiwisolver==1.4.5 lazy_loader==0.4 libclang==18.1.1 llvmlite==0.42.0 lmdb==1.4.1 Markdown==3.6 markdown-it-py==3.0.0 MarkupSafe==2.1.5 matplotlib==3.9.0 maxminddb==2.6.0 mdurl==0.1.2 mpmath==1.3.0 multidict==6.0.5 networkx==3.3 numba==0.59.1 numexpr @ file:///croot/numexpr_1696515281613/work numpy==1.24.3 oauthlib==3.2.2 onnx==1.14.0 onnxruntime-gpu==1.15.1 openai==1.12.0 opencv-python==4.9.0.80 opencv-python-headless==4.9.0.80 opennsfw2==0.10.2 opt-einsum==3.3.0 packaging==24.0 paho-mqtt==1.6.1 pexpect @ file:///tmp/build/80754af9/pexpect_1605563209008/work Pillow==10.0.0 platformdirs==4.2.2 prettytable==3.10.0 protobuf==3.19.6 proxybroker==0.3.2 psutil==5.9.5 ptyprocess @ file:///tmp/build/80754af9/ptyprocess_1609355006118/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl pyasn1==0.6.0 pyasn1_modules==0.4.0 pycares==4.4.0 pycparser==2.21 pydantic==2.6.2 pydantic_core==2.16.3 Pygments==2.17.2 PySocks==1.7.1 python-dateutil==2.9.0.post0 python-telegram-bot==21.1.1 qudida==0.0.4 requests==2.27.1 requests-oauthlib==2.0.0 rich==13.7.0 rsa==4.9 scikit-image==0.23.2 scikit-learn==1.4.2 scipy==1.13.0 shell_gpt==1.4.0 six==1.16.0 sniffio==1.3.0 sympy==1.12 tb-nightly==2.17.0a20240515 tenacity==8.2.3 tensorboard==2.10.1 tensorboard-data-server==0.6.1 tensorboard-plugin-wit==1.8.1 tensorflow-cpu==2.10.1 tensorflow-estimator==2.10.0 tensorflow-io-gcs-filesystem==0.37.0 termcolor==2.4.0 threadpoolctl==3.5.0 tifffile==2024.5.10 tk==0.1.0 tkinterdnd2==0.3.0 tomli==2.0.1 torch==2.1.2+cu118 torchvision==0.16.2+cu118 tqdm==4.65.0 triton==2.1.0 typer==0.9.0 typing_extensions==4.5.0 urllib3==1.26.9 wcwidth==0.2.13 Werkzeug==3.0.1 wrapt==1.16.0 yapf==0.40.2 yarl==1.9.4

============== Conda Packages ==============

packages in environment at /home/grogu/miniconda3/envs/faceswap:

#

Name Version Build Channel

_libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_gnu conda-forge aom 3.5.0 h27087fc_0 conda-forge blas 1.0 openblas
bzip2 1.0.8 h5eee18b_6
c-ares 1.19.1 h5eee18b_0
ca-certificates 2024.3.11 h06a4308_0
certifi 2024.2.2 pypi_0 pypi curl 8.7.1 hdbd6064_0
expat 2.6.2 h6a678d5_0
fastcluster 1.2.6 py310hcc13569_3 conda-forge ffmpeg 5.1.2 gpl_h8dda1f0_106 conda-forge ffmpy 0.3.0 pyhb6f538c_0 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 h77eed37_2 conda-forge fontconfig 2.14.2 h14ed4e7_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge freetype 2.12.1 h267a509_2 conda-forge gdbm 1.18 hd4cb3f1_4
gettext 0.21.0 h39681ba_1
giflib 5.2.1 h5eee18b_3
git 2.40.1 pl5340h36fbf9e_1
gmp 6.3.0 h59595ed_1 conda-forge gnutls 3.7.9 hb077bed_0 conda-forge google-auth-oauthlib 0.4.6 pypi_0 pypi icu 73.1 h6a678d5_0
idna 3.7 pypi_0 pypi imageio-ffmpeg 0.4.9 pypi_0 pypi jpeg 9e h5eee18b_1
keras 2.10.0 pypi_0 pypi keras-preprocessing 1.1.2 pypi_0 pypi krb5 1.20.1 h143b758_1
lame 3.100 h166bdaf_1003 conda-forge lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.38 h1181459_1
lerc 3.0 h295c915_0
libcurl 8.7.1 h251f7ec_0
libdeflate 1.17 h5eee18b_1
libdrm 2.4.120 hd590300_0 conda-forge libedit 3.1.20230828 h5eee18b_0
libev 4.33 h7f8727e_1
libffi 3.4.4 h6a678d5_1
libgcc-ng 13.2.0 h77fa898_7 conda-forge libgfortran-ng 11.2.0 h00389a5_1
libgfortran5 11.2.0 h1234567_1
libgomp 13.2.0 h77fa898_7 conda-forge libidn2 2.3.3 h166bdaf_0 conda-forge libnghttp2 1.57.0 h2d74bed_0
libnsl 2.0.1 hd590300_0 conda-forge libopenblas 0.3.21 h043d6bf_0
libopus 1.3.1 h7f98852_1 conda-forge libpciaccess 0.18 hd590300_0 conda-forge libpng 1.6.43 h2797004_0 conda-forge libsqlite 3.45.3 h2797004_0 conda-forge libssh2 1.11.0 h251f7ec_0
libstdcxx-ng 13.2.0 hc0a3c3a_7 conda-forge libtasn1 4.19.0 h166bdaf_0 conda-forge libtiff 4.5.1 h6a678d5_0
libunistring 0.9.10 h7f98852_0 conda-forge libuuid 2.38.1 h0b41bf4_0 conda-forge libva 2.21.0 hd590300_0 conda-forge libvpx 1.11.0 h9c3ff4c_3 conda-forge libwebp 1.3.2 h11a3e52_0
libwebp-base 1.3.2 h5eee18b_0
libxcb 1.15 h0b41bf4_0 conda-forge libxcrypt 4.4.36 hd590300_1 conda-forge libxml2 2.10.4 hfdd30dd_2
libzlib 1.2.13 hd590300_5 conda-forge lz4-c 1.9.4 h6a678d5_1
ncurses 6.4 h6a678d5_0
nettle 3.9.1 h7ab15ed_0 conda-forge numexpr 2.8.7 py310h286c3b5_0
numpy 1.26.4 py310heeff2f4_0
numpy-base 1.26.4 py310h8a23956_0
oauthlib 3.2.2 pypi_0 pypi opencv-python 4.9.0.80 pypi_0 pypi openh264 2.3.1 hcb278e6_2 conda-forge openssl 3.3.0 hd590300_0 conda-forge p11-kit 0.24.1 hc5aa10d_0 conda-forge packaging 24.0 pypi_0 pypi pcre2 10.42 hebb0a14_1
perl 5.34.0 h5eee18b_2
pexpect 4.8.0 pyhd3eb1b0_3
pillow 9.4.0 py310h6a678d5_1
pip 24.0 py310h06a4308_0
protobuf 3.19.6 pypi_0 pypi pthread-stubs 0.4 h36c2ea0_1001 conda-forge ptyprocess 0.7.0 pyhd3eb1b0_2
python 3.10.13 hd12c33a_1_cpython conda-forge python_abi 3.10 4_cp310 conda-forge readline 8.2 h5eee18b_0
setuptools 69.5.1 py310h06a4308_0
six 1.16.0 pypi_0 pypi sqlite 3.45.3 h5eee18b_0
svt-av1 1.4.1 hcb278e6_0 conda-forge tensorboard 2.10.1 pypi_0 pypi tensorboard-data-server 0.6.1 pypi_0 pypi tensorboard-plugin-wit 1.8.1 pypi_0 pypi tensorflow-cpu 2.10.1 pypi_0 pypi tensorflow-estimator 2.10.0 pypi_0 pypi tk 8.6.13 xft_h2e05e87_1 conda-forge tzdata 2024a h04d1e81_0
wheel 0.43.0 py310h06a4308_0
x264 1!164.3095 h166bdaf_2 conda-forge x265 3.5 h924138e_3 conda-forge xorg-fixesproto 5.0 h7f98852_1002 conda-forge xorg-kbproto 1.0.7 h7f98852_1002 conda-forge xorg-libx11 1.8.9 h8ee46fc_0 conda-forge xorg-libxau 1.0.11 hd590300_0 conda-forge xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge xorg-libxext 1.3.4 h0b41bf4_2 conda-forge xorg-libxfixes 5.0.3 h7f98852_1004 conda-forge xorg-libxft 2.3.8 hf69aa0a_0 conda-forge xorg-libxrender 0.9.11 hd590300_0 conda-forge xorg-renderproto 0.11.1 h7f98852_1002 conda-forge xorg-xextproto 7.3.0 h0b41bf4_1003 conda-forge xorg-xproto 7.0.31 h7f98852_1007 conda-forge xz 5.4.6 h5eee18b_1
zlib 1.2.13 hd590300_5 conda-forge zstd 1.5.5 hc292b87_2

================= Configs ================== --------- train.ini ---------

[global] centering: face coverage: 87.5 icnr_init: False conv_aware_init: False optimizer: adam learning_rate: 5e-05 epsilon_exponent: -7 save_optimizer: exit lr_finder_iterations: 1000 lr_finder_mode: set lr_finder_strength: default autoclip: False reflect_padding: False allow_growth: False mixed_precision: False nan_protection: True convert_batchsize: 16

[global.loss] loss_function: ssim loss_function_2: mse loss_weight_2: 100 loss_function_3: none loss_weight_3: 0 loss_function_4: none loss_weight_4: 0 mask_loss_function: mse eye_multiplier: 3 mouth_multiplier: 2 penalized_mask_loss: True mask_type: extended mask_dilation: 0 mask_blur_kernel: 3 mask_threshold: 4 learn_mask: False

[trainer.original] preview_images: 14 mask_opacity: 30 mask_color: #ff0000 zoom_amount: 5 rotation_range: 10 shift_range: 5 flip_chance: 50 color_lightness: 30 color_ab: 8 color_clahe_chance: 50 color_clahe_max_size: 4

[model.dlight] features: best details: good output_size: 256

[model.villain] lowmem: False

[model.phaze_a] output_size: 128 shared_fc: none enable_gblock: True split_fc: True split_gblock: False split_decoders: False enc_architecture: fs_original enc_scaling: 7 enc_load_weights: True bottleneck_type: dense bottleneck_norm: none bottleneck_size: 1024 bottleneck_in_encoder: True fc_depth: 1 fc_min_filters: 1024 fc_max_filters: 1024 fc_dimensions: 4 fc_filter_slope: -0.5 fc_dropout: 0.0 fc_upsampler: upsample2d fc_upsamples: 1 fc_upsample_filters: 512 fc_gblock_depth: 3 fc_gblock_min_nodes: 512 fc_gblock_max_nodes: 512 fc_gblock_filter_slope: -0.5 fc_gblock_dropout: 0.0 dec_upscale_method: subpixel dec_upscales_in_fc: 0 dec_norm: none dec_min_filters: 64 dec_max_filters: 512 dec_slope_mode: full dec_filter_slope: -0.45 dec_res_blocks: 1 dec_output_kernel: 5 dec_gaussian: True dec_skip_last_residual: True freeze_layers: keras_encoder load_layers: encoder fs_original_depth: 4 fs_original_min_filters: 128 fs_original_max_filters: 1024 fs_original_use_alt: False mobilenet_width: 1.0 mobilenet_depth: 1 mobilenet_dropout: 0.001 mobilenet_minimalistic: False

[model.dfaker] output_size: 128

[model.dfl_h128] lowmem: False

[model.dfl_sae] input_size: 128 architecture: df autoencoder_dims: 0 encoder_dims: 42 decoder_dims: 21 multiscale_decoder: False

[model.realface] input_size: 64 output_size: 128 dense_nodes: 1536 complexity_encoder: 128 complexity_decoder: 512

[model.unbalanced] input_size: 128 lowmem: False nodes: 1024 complexity_encoder: 128 complexity_decoder_a: 384 complexity_decoder_b: 512

[model.original] lowmem: False

--------- extract.ini ---------

[global] allow_growth: False aligner_min_scale: 0.07 aligner_max_scale: 2.0 aligner_distance: 22.5 aligner_roll: 45.0 aligner_features: True filter_refeed: True save_filtered: False realign_refeeds: True filter_realign: True

[align.external] file_name: import.json origin: top-left 4_point_centering: head

[align.fan] batch-size: 12

[detect.mtcnn] minsize: 20 scalefactor: 0.709 batch-size: 8 cpu: True threshold_1: 0.6 threshold_2: 0.7 threshold_3: 0.7

[detect.external] file_name: import.json origin: top-left

[detect.s3fd] confidence: 70 batch-size: 4

[detect.cv2_dnn] confidence: 50

[mask.vgg_obstructed] batch-size: 2

[mask.vgg_clear] batch-size: 6

[mask.bisenet_fp] batch-size: 8 cpu: False weights: faceswap include_ears: False include_hair: False include_glasses: True

[mask.custom] batch-size: 8 centering: face fill: False

[mask.unet_dfl] batch-size: 8

[recognition.vgg_face2] batch-size: 16 cpu: False

--------- .faceswap --------- backend: cpu

--------- convert.ini ---------

[writer.pillow] format: png draw_transparent: False separate_mask: False optimize: False gif_interlace: True jpg_quality: 75 png_compress_level: 3 tif_compression: tiff_deflate

[writer.opencv] format: png draw_transparent: False separate_mask: False jpg_quality: 75 png_compress_level: 3

[writer.ffmpeg] container: mp4 codec: libx264 crf: 23 preset: medium tune: none profile: auto level: auto skip_mux: False

[writer.gif] fps: 25 loop: 0 palettesize: 256 subrectangles: False

[writer.patch] start_index: 0 index_offset: 0 number_padding: 6 include_filename: True face_index_location: before origin: bottom-left empty_frames: blank json_output: False separate_mask: False bit_depth: 16 format: png png_compress_level: 3 tiff_compression_method: lzw

[mask.mask_blend] type: normalized kernel_size: 3 passes: 4 threshold: 4 erosion: 0.0 erosion_top: 0.0 erosion_bottom: 0.0 erosion_left: 0.0 erosion_right: 0.0

[scaling.sharpen] method: none amount: 150 radius: 0.3 threshold: 5.0

[color.color_transfer] clip: True preserve_paper: True

[color.match_hist] threshold: 99.0

[color.manual_balance] colorspace: HSV balance_1: 0.0 balance_2: 0.0 balance_3: 0.0 contrast: 0.0 brightness: 0.0**

torzdf commented 4 months ago

Your environment is polluted with all kinds of non-faceswap related packages.

Do this: https://forum.faceswap.dev/app.php/faqpage?sid=30bc5dea5b0fdace789b769543a90124#f1r1