[GH-ISSUE #148] Error: Could not import the 'talkinghead' module. #82

Open
opened 2026-10-15 18:04:12 +00:00 by bsakaguchi · 33 comments
Owner

Originally created by @xNissX233 on GitHub (Sep 5, 2023).
Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/148

Reinstalled multiple times and installed all requirements, when trying to run it says:

Using torch device: cpu
Initializing talkinghead pipeline in cuda mode....
Error: Could not import the 'talkinghead' module.

Same with CPU mode

Originally created by @xNissX233 on GitHub (Sep 5, 2023). Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/148 Reinstalled multiple times and installed all requirements, when trying to run it says: ``` Using torch device: cpu Initializing talkinghead pipeline in cuda mode.... Error: Could not import the 'talkinghead' module. ``` Same with CPU mode
Author
Owner

@Cohee1207 commented on GitHub (Sep 5, 2023):

Python version?

<!-- gh-comment-id:1706425894 --> @Cohee1207 commented on GitHub (Sep 5, 2023): Python version?
Author
Owner

@xNissX233 commented on GitHub (Sep 5, 2023):

I followed this installation guide: https://docs.sillytavern.app/extras/installation/

So python 3.11

<!-- gh-comment-id:1706427266 --> @xNissX233 commented on GitHub (Sep 5, 2023): I followed this installation guide: https://docs.sillytavern.app/extras/installation/ So python 3.11
Author
Owner

@Cohee1207 commented on GitHub (Sep 5, 2023):

And what is your operating system? Could you specify which requirement files you used exactly?

<!-- gh-comment-id:1706431301 --> @Cohee1207 commented on GitHub (Sep 5, 2023): And what is your operating system? Could you specify which requirement files you used exactly?
Author
Owner

@xNissX233 commented on GitHub (Sep 5, 2023):

I'm using Arch Linux.
The requirement files is this one: https://github.com/SillyTavern/SillyTavern-Extras/blob/main/requirements-complete.txt

<!-- gh-comment-id:1706438110 --> @xNissX233 commented on GitHub (Sep 5, 2023): I'm using Arch Linux. The requirement files is this one: https://github.com/SillyTavern/SillyTavern-Extras/blob/main/requirements-complete.txt
Author
Owner

@Cohee1207 commented on GitHub (Sep 5, 2023):

Thank you for the clarification. wxpython is not automatically installed in Linux because it fails to install on colab but is needed to run this module. Please run this in your conda env:
pip install wxpython==4.2.1

<!-- gh-comment-id:1706525017 --> @Cohee1207 commented on GitHub (Sep 5, 2023): Thank you for the clarification. wxpython is not automatically installed in Linux because it fails to install on colab but is needed to run this module. Please run this in your conda env: `pip install wxpython==4.2.1`
Author
Owner

@xNissX233 commented on GitHub (Sep 5, 2023):

after successfully installing it, I run extras with the module activated and now it crashes with this error:


Python 3.11 or newer is recommended to run this program.
Traceback (most recent call last):
 File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py", line 131, in <module>
   args = parser.parse_args()
 File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 1836, in parse_args
   self.error(msg % ' '.join(argv))
 File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 2592, in error
   self.print_usage(_sys.stderr)
 File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 2562, in print_usage
   self._print_message(self.format_usage(), file)
 File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 2528, in format_usage
   return formatter.format_help()
 File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 283, in format_help
   help = self._root_section.format_help()
 File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 214, in format_help
   item_help = join([func(*args) for func, args in self.items])
 File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 214, in <listcomp>
   item_help = join([func(*args) for func, args in self.items])
 File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 321, in _format_usage
   action_usage = format(optionals + positionals, groups)
 File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 396, in _format_actions_usage
   raise ValueError(f'empty group {group}')
ValueError: empty group <argparse._MutuallyExclusiveGroup object at 0x7f166957c400>

Trying to run it with only the talkinghead module, gives this other error:


Initializing talkinghead pipeline in cpu mode....
Traceback (most recent call last):
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py", line 192, in <module>
    import talkinghead.tha3.app.app as talkinghead
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/talkinghead/tha3/app/app.py", line 11, in <module>
    import wx
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/site-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/site-packages/wx/core.py", line 12, in <module>
    from ._core import *
ImportError: /run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/site-packages/wx/_core.cpython-310-x86_64-linux-gnu.so)

<!-- gh-comment-id:1706587014 --> @xNissX233 commented on GitHub (Sep 5, 2023): after successfully installing it, I run extras with the module activated and now it crashes with this error: ``` Python 3.11 or newer is recommended to run this program. Traceback (most recent call last): File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py", line 131, in <module> args = parser.parse_args() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 1836, in parse_args self.error(msg % ' '.join(argv)) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 2592, in error self.print_usage(_sys.stderr) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 2562, in print_usage self._print_message(self.format_usage(), file) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 2528, in format_usage return formatter.format_help() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 283, in format_help help = self._root_section.format_help() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 214, in format_help item_help = join([func(*args) for func, args in self.items]) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 214, in <listcomp> item_help = join([func(*args) for func, args in self.items]) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 321, in _format_usage action_usage = format(optionals + positionals, groups) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/argparse.py", line 396, in _format_actions_usage raise ValueError(f'empty group {group}') ValueError: empty group <argparse._MutuallyExclusiveGroup object at 0x7f166957c400> ``` Trying to run it with only the talkinghead module, gives this other error: ``` Initializing talkinghead pipeline in cpu mode.... Traceback (most recent call last): File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py", line 192, in <module> import talkinghead.tha3.app.app as talkinghead File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/talkinghead/tha3/app/app.py", line 11, in <module> import wx File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/site-packages/wx/__init__.py", line 17, in <module> from wx.core import * File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/site-packages/wx/core.py", line 12, in <module> from ._core import * ImportError: /run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/installer_files/env/lib/python3.10/site-packages/wx/_core.cpython-310-x86_64-linux-gnu.so) ```
Author
Owner

@Cohee1207 commented on GitHub (Sep 5, 2023):

The log implies that you are not running it with Python 3.11. (First line and this part: installer_files/env/lib/python3.10).
I highly encourage you not to mix the Extras files with oobabooga files, Please put the installation folder somewhere, there could be conflicts between them that are hard to catch.

<!-- gh-comment-id:1706592919 --> @Cohee1207 commented on GitHub (Sep 5, 2023): The log implies that you are not running it with Python 3.11. (First line and this part: `installer_files/env/lib/python3.10`). I highly encourage you not to mix the Extras files with oobabooga files, Please put the installation folder somewhere, there could be conflicts between them that are hard to catch.
Author
Owner

@xNissX233 commented on GitHub (Sep 5, 2023):

That's true, for this try I tried with the old installation and that's why, my bad. I didn't know the old installation had an old python version (this installation was not used in my other tries, just this one because I was lazy to reinstall again).
I reinstalled again and now it crashes with this error:

python "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py" --enable-modules=classify,talkinghead
Using torch device: cpu
Initializing talkinghead pipeline in cpu mode....
Traceback (most recent call last):
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py", line 192, in <module>
    import talkinghead.tha3.app.app as talkinghead
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/talkinghead/tha3/app/app.py", line 11, in <module>
    import wx
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/core.py", line 12, in <module>
    from ._core import *
ImportError: /run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/_core.cpython-311-x86_64-linux-gnu.so)
<!-- gh-comment-id:1706625858 --> @xNissX233 commented on GitHub (Sep 5, 2023): That's true, for this try I tried with the old installation and that's why, my bad. I didn't know the old installation had an old python version (this installation was not used in my other tries, just this one because I was lazy to reinstall again). I reinstalled again and now it crashes with this error: ``` python "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py" --enable-modules=classify,talkinghead Using torch device: cpu Initializing talkinghead pipeline in cpu mode.... Traceback (most recent call last): File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py", line 192, in <module> import talkinghead.tha3.app.app as talkinghead File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/talkinghead/tha3/app/app.py", line 11, in <module> import wx File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/__init__.py", line 17, in <module> from wx.core import * File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/core.py", line 12, in <module> from ._core import * ImportError: /run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/_core.cpython-311-x86_64-linux-gnu.so) ```
Author
Owner

@Cohee1207 commented on GitHub (Sep 5, 2023):

Try updating gcc-libs package with pacman. Or do a complete system update if possible.

<!-- gh-comment-id:1706631174 --> @Cohee1207 commented on GitHub (Sep 5, 2023): Try updating gcc-libs package with pacman. Or do a complete system update if possible.
Author
Owner

@xNissX233 commented on GitHub (Sep 5, 2023):

I did a full update and remains the same (there was no gcc-libs updates available, I updated the last time yesterday so it's expected)

<!-- gh-comment-id:1706646440 --> @xNissX233 commented on GitHub (Sep 5, 2023): I did a full update and remains the same (there was no gcc-libs updates available, I updated the last time yesterday so it's expected)
Author
Owner

@Cohee1207 commented on GitHub (Sep 5, 2023):

I found this: https://github.com/rstudio/reticulate/issues/1282#issuecomment-1272473007
This is for a different program, but outlines the potential solutions pretty nicely. I would try option 3 with replacing this library /run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/bin/../lib/libstdc++.so.6 with a symbolic link to your system libstdc++.so.6, which usually resides in usr/lib/x86_64-linux-gnu/libstdc++.so.6

<!-- gh-comment-id:1706684656 --> @Cohee1207 commented on GitHub (Sep 5, 2023): I found this: https://github.com/rstudio/reticulate/issues/1282#issuecomment-1272473007 This is for a different program, but outlines the potential solutions pretty nicely. I would try option 3 with replacing this library `/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/bin/../lib/libstdc++.so.6` with a symbolic link to your system libstdc++.so.6, which usually resides in `usr/lib/x86_64-linux-gnu/libstdc++.so.6`
Author
Owner

@xNissX233 commented on GitHub (Sep 5, 2023):

Now crashes with this:


Initializing talkinghead pipeline in cpu mode....
Traceback (most recent call last):
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py", line 192, in <module>
    import talkinghead.tha3.app.app as talkinghead
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/talkinghead/tha3/app/app.py", line 11, in <module>
    import wx
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/core.py", line 12, in <module>
    from ._core import *
ImportError: /usr/lib/libcurl.so.4: undefined symbol: libssh2_session_set_read_timeout

I tried replacing with the symbolic link and also tried with the file the system link points to, same result.

<!-- gh-comment-id:1706696177 --> @xNissX233 commented on GitHub (Sep 5, 2023): Now crashes with this: ``` Initializing talkinghead pipeline in cpu mode.... Traceback (most recent call last): File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py", line 192, in <module> import talkinghead.tha3.app.app as talkinghead File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/talkinghead/tha3/app/app.py", line 11, in <module> import wx File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/__init__.py", line 17, in <module> from wx.core import * File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/core.py", line 12, in <module> from ._core import * ImportError: /usr/lib/libcurl.so.4: undefined symbol: libssh2_session_set_read_timeout ``` I tried replacing with the symbolic link and also tried with the file the system link points to, same result.
Author
Owner

@Cohee1207 commented on GitHub (Sep 6, 2023):

Sorry, out of ideas for now, I don't have a broad Linux (or Arch specifically) knowledge to propose anything else.

<!-- gh-comment-id:1708968179 --> @Cohee1207 commented on GitHub (Sep 6, 2023): Sorry, out of ideas for now, I don't have a broad Linux (or Arch specifically) knowledge to propose anything else.
Author
Owner

@Ph0rk0z commented on GitHub (Sep 6, 2023):

I have no problem with venv shared with textgen or python 3.10. Hardest part was installing wxpython because it needed gnome development libraries. I think I had to compile it from scratch.

op has broken libs: https://stackoverflow.com/questions/76902771/pacman-symbol-lookup-error-usr-lib-libcurl-so-4-undefined-symbol-libssh2-se

<!-- gh-comment-id:1709196176 --> @Ph0rk0z commented on GitHub (Sep 6, 2023): I have no problem with venv shared with textgen or python 3.10. Hardest part was installing wxpython because it needed gnome development libraries. I think I had to compile it from scratch. op has broken libs: https://stackoverflow.com/questions/76902771/pacman-symbol-lookup-error-usr-lib-libcurl-so-4-undefined-symbol-libssh2-se
Author
Owner

@xNissX233 commented on GitHub (Sep 7, 2023):

The problem was that I didn't set the correct path of the folder. Now I got it running but still throws an error when trying to load the default page:

Traceback (most recent call last):
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/flask_cors/extension.py", line 176, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
                                                ^^^^^^^^^^^^^^^^^^
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py", line 701, in result_feed
    return talkinghead.result_feed()
           ^^^^^^^^^^^
NameError: name 'talkinghead' is not defined

<!-- gh-comment-id:1709949539 --> @xNissX233 commented on GitHub (Sep 7, 2023): The problem was that I didn't set the correct path of the folder. Now I got it running but still throws an error when trying to load the default page: ``` Traceback (most recent call last): File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/flask_cors/extension.py", line 176, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) ^^^^^^^^^^^^^^^^^^ File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py", line 701, in result_feed return talkinghead.result_feed() ^^^^^^^^^^^ NameError: name 'talkinghead' is not defined ```
Author
Owner

@xNissX233 commented on GitHub (Sep 7, 2023):

I have no problem with venv shared with textgen or python 3.10. Hardest part was installing wxpython because it needed gnome development libraries. I think I had to compile it from scratch.

op has broken libs: https://stackoverflow.com/questions/76902771/pacman-symbol-lookup-error-usr-lib-libcurl-so-4-undefined-symbol-libssh2-se

I checked the md5sum of my file and it's the same as the one in the official Arch repos, so I don't think I have broken libs

Also I get this if I run in the correct path:

(extras) [ruben@ruben SillyTavern-extras]$ python server.py --enable-modules=talkinghead
Using torch device: cpu
Initializing talkinghead pipeline in cpu mode....
Error: Could not import the 'talkinghead' module.
No API key given because you are running locally.
 * Serving Flask app 'server'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://localhost:5100
Press CTRL+C to quit

I'm in the path of the server.py file, all requirements installed and still could not import module

<!-- gh-comment-id:1709960671 --> @xNissX233 commented on GitHub (Sep 7, 2023): > I have no problem with venv shared with textgen or python 3.10. Hardest part was installing wxpython because it needed gnome development libraries. I think I had to compile it from scratch. > > op has broken libs: https://stackoverflow.com/questions/76902771/pacman-symbol-lookup-error-usr-lib-libcurl-so-4-undefined-symbol-libssh2-se I checked the md5sum of my file and it's the same as the one in the official Arch repos, so I don't think I have broken libs Also I get this if I run in the correct path: ``` (extras) [ruben@ruben SillyTavern-extras]$ python server.py --enable-modules=talkinghead Using torch device: cpu Initializing talkinghead pipeline in cpu mode.... Error: Could not import the 'talkinghead' module. No API key given because you are running locally. * Serving Flask app 'server' * Debug mode: off WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Running on http://localhost:5100 Press CTRL+C to quit ``` I'm in the path of the server.py file, all requirements installed and still could not import module
Author
Owner

@Ph0rk0z commented on GitHub (Sep 7, 2023):

You have to run the "app.py" python separately. It didn't auto start it for me. I usually run it first. For some reason on one of them, the eyes blink but the mouth doesn't move. There aren't a lot of chars with expressions that worked for me yet. I think I'll have to generate some and matte them.

<!-- gh-comment-id:1710001348 --> @Ph0rk0z commented on GitHub (Sep 7, 2023): You have to run the "app.py" python separately. It didn't auto start it for me. I usually run it first. For some reason on one of them, the eyes blink but the mouth doesn't move. There aren't a lot of chars with expressions that worked for me yet. I think I'll have to generate some and matte them.
Author
Owner

@xNissX233 commented on GitHub (Sep 7, 2023):

You have to run the "app.py" python separately. It didn't auto start it for me. I usually run it first. For some reason on one of them, the eyes blink but the mouth doesn't move. There aren't a lot of chars with expressions that worked for me yet. I think I'll have to generate some and matte them.

what app.py do you mean? the one in talkinghead/tha3/app/? If I run it (from extras folder, conda environment active) it crashes with:

Traceback (most recent call last):
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/talkinghead/tha3/app/app.py", line 11, in <module>
    import wx
ModuleNotFoundError: No module named 'wx'

<!-- gh-comment-id:1710008187 --> @xNissX233 commented on GitHub (Sep 7, 2023): > You have to run the "app.py" python separately. It didn't auto start it for me. I usually run it first. For some reason on one of them, the eyes blink but the mouth doesn't move. There aren't a lot of chars with expressions that worked for me yet. I think I'll have to generate some and matte them. what app.py do you mean? the one in talkinghead/tha3/app/? If I run it (from extras folder, conda environment active) it crashes with: ``` Traceback (most recent call last): File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/talkinghead/tha3/app/app.py", line 11, in <module> import wx ModuleNotFoundError: No module named 'wx' ```
Author
Owner

@Ph0rk0z commented on GitHub (Sep 7, 2023):

Then you still didn't properly install wxpython. It was kind hard like I said, had to do it from source.

<!-- gh-comment-id:1710289579 --> @Ph0rk0z commented on GitHub (Sep 7, 2023): Then you still didn't properly install wxpython. It was kind hard like I said, had to do it from source.
Author
Owner

@xNissX233 commented on GitHub (Sep 7, 2023):

I did pip install wxPython, is not enough?

<!-- gh-comment-id:1710305532 --> @xNissX233 commented on GitHub (Sep 7, 2023): I did pip install wxPython, is not enough?
Author
Owner

@Ph0rk0z commented on GitHub (Sep 7, 2023):

Did it install or fail? It failed on me with that command until I installed a bunch of libs. Ended up compiling it.

https://stackoverflow.com/questions/8609666/python-importerror-no-module-named-wx

<!-- gh-comment-id:1710313077 --> @Ph0rk0z commented on GitHub (Sep 7, 2023): Did it install or fail? It failed on me with that command until I installed a bunch of libs. Ended up compiling it. https://stackoverflow.com/questions/8609666/python-importerror-no-module-named-wx
Author
Owner

@xNissX233 commented on GitHub (Sep 7, 2023):

It installed fine

<!-- gh-comment-id:1710327286 --> @xNissX233 commented on GitHub (Sep 7, 2023): It installed fine
Author
Owner

@Ph0rk0z commented on GitHub (Sep 7, 2023):

Its not importing so it couldn't have or it went in wrong venv.

<!-- gh-comment-id:1710850548 --> @Ph0rk0z commented on GitHub (Sep 7, 2023): Its not importing so it couldn't have or it went in wrong venv.
Author
Owner

@xNissX233 commented on GitHub (Sep 7, 2023):

Well I know it couldn't import... but now I don't know why it could be, there's no other output apart from that one, and I didn't make the mistakes I made with the other errors, I don't know what I'm doing wrong now, everything else works perfectly

<!-- gh-comment-id:1710862171 --> @xNissX233 commented on GitHub (Sep 7, 2023): Well I know it couldn't import... but now I don't know why it could be, there's no other output apart from that one, and I didn't make the mistakes I made with the other errors, I don't know what I'm doing wrong now, everything else works perfectly
Author
Owner

@Ph0rk0z commented on GitHub (Sep 7, 2023):

does it show up when you pip list?

You can always do: https://aur.archlinux.org/packages/python-wxpython-git

<!-- gh-comment-id:1710868104 --> @Ph0rk0z commented on GitHub (Sep 7, 2023): does it show up when you pip list? You can always do: https://aur.archlinux.org/packages/python-wxpython-git
Author
Owner

@xNissX233 commented on GitHub (Sep 7, 2023):

does it show up when you pip list?

You can always do: https://aur.archlinux.org/packages/python-wxpython-git

it shows:
wxPython 4.2.1

Maybe the version is not correct? Also depending on the directory I run from, I sometimes get this:

Traceback (most recent call last):
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/talkinghead/tha3/app/app.py", line 11, in <module>
    import wx
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/core.py", line 12, in <module>
    from ._core import *
ImportError: /usr/lib/libcurl.so.4: undefined symbol: libssh2_session_set_read_timeout

I think it's the same error I got in RVC, but that one got solved with the correct cd, but this one won't...

<!-- gh-comment-id:1710869869 --> @xNissX233 commented on GitHub (Sep 7, 2023): > does it show up when you pip list? > > You can always do: https://aur.archlinux.org/packages/python-wxpython-git it shows: wxPython 4.2.1 Maybe the version is not correct? Also depending on the directory I run from, I sometimes get this: ``` Traceback (most recent call last): File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/talkinghead/tha3/app/app.py", line 11, in <module> import wx File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/__init__.py", line 17, in <module> from wx.core import * File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/core.py", line 12, in <module> from ._core import * ImportError: /usr/lib/libcurl.so.4: undefined symbol: libssh2_session_set_read_timeout ``` I think it's the same error I got in RVC, but that one got solved with the correct cd, but this one won't...
Author
Owner

@xNissX233 commented on GitHub (Sep 7, 2023):

So if I run it normally I get this:


(extras) [ruben@ruben SillyTavern-extras]$ python server.py --enable-modules=talkinghead
Using torch device: cpu
Initializing talkinghead pipeline in cpu mode....
Traceback (most recent call last):
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py", line 192, in <module>
    import talkinghead.tha3.app.app as talkinghead
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/talkinghead/tha3/app/app.py", line 11, in <module>
    import wx
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/core.py", line 12, in <module>
    from ._core import *
ImportError: /run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/_core.cpython-311-x86_64-linux-gnu.so)

And the problem could be the version of that library, so I try replacing with my library which is the correct version and then get this other error:


(extras) [ruben@ruben SillyTavern-extras]$ python server.py --enable-modules=talkinghead
Using torch device: cpu
Initializing talkinghead pipeline in cpu mode....
Traceback (most recent call last):
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py", line 192, in <module>
    import talkinghead.tha3.app.app as talkinghead
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/talkinghead/tha3/app/app.py", line 11, in <module>
    import wx
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/core.py", line 12, in <module>
    from ._core import *
ImportError: /usr/lib/libcurl.so.4: undefined symbol: libssh2_session_set_read_timeout

And trying to replace more libraries doesn't change anything anymore.
And trying to run app.py has other errors...
Is this absolutely only my fault? no one else has this errors?

<!-- gh-comment-id:1710878525 --> @xNissX233 commented on GitHub (Sep 7, 2023): So if I run it normally I get this: ``` (extras) [ruben@ruben SillyTavern-extras]$ python server.py --enable-modules=talkinghead Using torch device: cpu Initializing talkinghead pipeline in cpu mode.... Traceback (most recent call last): File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py", line 192, in <module> import talkinghead.tha3.app.app as talkinghead File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/talkinghead/tha3/app/app.py", line 11, in <module> import wx File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/__init__.py", line 17, in <module> from wx.core import * File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/core.py", line 12, in <module> from ._core import * ImportError: /run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/_core.cpython-311-x86_64-linux-gnu.so) ``` And the problem could be the version of that library, so I try replacing with my library which is the correct version and then get this other error: ``` (extras) [ruben@ruben SillyTavern-extras]$ python server.py --enable-modules=talkinghead Using torch device: cpu Initializing talkinghead pipeline in cpu mode.... Traceback (most recent call last): File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/server.py", line 192, in <module> import talkinghead.tha3.app.app as talkinghead File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/SillyTavern-extras/talkinghead/tha3/app/app.py", line 11, in <module> import wx File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/__init__.py", line 17, in <module> from wx.core import * File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/core.py", line 12, in <module> from ._core import * ImportError: /usr/lib/libcurl.so.4: undefined symbol: libssh2_session_set_read_timeout ``` And trying to replace more libraries doesn't change anything anymore. And trying to run app.py has other errors... Is this absolutely only my fault? no one else has this errors?
Author
Owner

@Ph0rk0z commented on GitHub (Sep 8, 2023):

I had problems with wxpython like you but I googled them all and fixed it. What I do different is I have an nvidia conda environment with latest torch and not 50 venv for each project. Super rare that requirements are actually those versions for a reason. Some of these repos want you to install torch 1.0.x like a crazy person.

You have to investigate why curl is broken.. my guess is when you fix the glib for WX it's different from the one curl was compiled for. These are total arch problems which is why when I installed my ML server I was like arch, fuck no. Went with mint to have some stability in libraries.

I think your fastest fix is to put glib back how it was and compile wx from source instead of using the pip package.

<!-- gh-comment-id:1710910696 --> @Ph0rk0z commented on GitHub (Sep 8, 2023): I had problems with wxpython like you but I googled them all and fixed it. What I do different is I have an nvidia conda environment with latest torch and not 50 venv for each project. Super rare that requirements are actually those versions for a reason. Some of these repos want you to install torch 1.0.x like a crazy person. You have to investigate why curl is broken.. my guess is when you fix the glib for WX it's different from the one curl was compiled for. These are total arch problems which is why when I installed my ML server I was like arch, fuck no. Went with mint to have *some* stability in libraries. I think your fastest fix is to put glib back how it was and compile wx from source instead of using the pip package.
Author
Owner

@xNissX233 commented on GitHub (Sep 15, 2023):

Update: After a lot of updates on Arch this days and reinstalling extras, the error is exactly the same. I think that this is not an Arch problem but a problem with this program itself...

<!-- gh-comment-id:1721115550 --> @xNissX233 commented on GitHub (Sep 15, 2023): Update: After a lot of updates on Arch this days and reinstalling extras, the error is exactly the same. I think that this is not an Arch problem but a problem with this program itself...
Author
Owner

@Ph0rk0z commented on GitHub (Sep 15, 2023):

Well.. if you think so. It runs on my machine.

<!-- gh-comment-id:1721740588 --> @Ph0rk0z commented on GitHub (Sep 15, 2023): Well.. if you think so. It runs on my machine.
Author
Owner

@Meamzy commented on GitHub (Oct 3, 2023):

@RBNXI, you might not have the requirements installed, I had same issue and figured it out here:
github.com/SillyTavern/SillyTavern-Extras@0d73db91e7/server.py (L183)

Basically if there are modules not found (no matter which module) this will return you

except ModuleNotFoundError:
        print("Error: Could not import the 'talkinghead' module.")

So I did:

    except Exception as err:
        print(err)
        print("Error: Could not import the 'talkinghead' module.")

And found out I didn't have some modules installed, such as 'scipy", so I went to the requirements-complete and installed it from there. (had to skip a couple of failing ones)

<!-- gh-comment-id:1744581142 --> @Meamzy commented on GitHub (Oct 3, 2023): @RBNXI, you might not have the requirements installed, I had same issue and figured it out here: https://github.com/SillyTavern/SillyTavern-Extras/blob/0d73db91e745ed22cc2829326acee45139b1a513/server.py#L183 Basically if there are modules not found (no matter which module) this will return you ~~~ except ModuleNotFoundError: print("Error: Could not import the 'talkinghead' module.") ~~~ So I did: ~~~ except Exception as err: print(err) print("Error: Could not import the 'talkinghead' module.") ~~~ And found out I didn't have some modules installed, such as 'scipy", so I went to the requirements-complete and installed it from there. (had to skip a couple of failing ones)
Author
Owner

@Aliceinchainsaw commented on GitHub (Oct 20, 2023):

@RBNXI, you might not have the requirements installed, I had same issue and figured it out here:

github.com/SillyTavern/SillyTavern-Extras@0d73db91e7/server.py (L183)

Basically if there are modules not found (no matter which module) this will return you

except ModuleNotFoundError:
        print("Error: Could not import the 'talkinghead' module.")

So I did:

    except Exception as err:
        print(err)
        print("Error: Could not import the 'talkinghead' module.")

And found out I didn't have some modules installed, such as 'scipy", so I went to the requirements-complete and installed it from there. (had to skip a couple of failing ones)

Excellent tip, mine was missing 'matplotlib'

<!-- gh-comment-id:1772082870 --> @Aliceinchainsaw commented on GitHub (Oct 20, 2023): > @RBNXI, you might not have the requirements installed, I had same issue and figured it out here: > > https://github.com/SillyTavern/SillyTavern-Extras/blob/0d73db91e745ed22cc2829326acee45139b1a513/server.py#L183 > > Basically if there are modules not found (no matter which module) this will return you > > ``` > except ModuleNotFoundError: > print("Error: Could not import the 'talkinghead' module.") > ``` > > So I did: > > ``` > except Exception as err: > print(err) > print("Error: Could not import the 'talkinghead' module.") > ``` > > And found out I didn't have some modules installed, such as 'scipy", so I went to the requirements-complete and installed it from there. (had to skip a couple of failing ones) Excellent tip, mine was missing 'matplotlib'
Author
Owner

@xNissX233 commented on GitHub (Oct 20, 2023):

@RBNXI, you might not have the requirements installed, I had same issue and figured it out here:

github.com/SillyTavern/SillyTavern-Extras@0d73db91e7/server.py (L183)

Basically if there are modules not found (no matter which module) this will return you

except ModuleNotFoundError:
        print("Error: Could not import the 'talkinghead' module.")

So I did:

    except Exception as err:
        print(err)
        print("Error: Could not import the 'talkinghead' module.")

And found out I didn't have some modules installed, such as 'scipy", so I went to the requirements-complete and installed it from there. (had to skip a couple of failing ones)

As I sad in my last comment, I don't have the "Could not import the 'talkinghead' module." error anymore. Running server.py crashes with
ImportError: /run/media/ruben/Prime/CharacterAI/SillyTavern-extras/miniconda/envs/extras/bin/../lib/libstdc++.so.6: version GLIBCXX_3.4.32 not found (required by /run/media/ruben/Prime/CharacterAI/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/_core.cpython-311-x86_64-linux-gnu.so)

And I installed all the requirements from requirements-complete, so I don't think it's a problem with python requirements.

<!-- gh-comment-id:1772303798 --> @xNissX233 commented on GitHub (Oct 20, 2023): > @RBNXI, you might not have the requirements installed, I had same issue and figured it out here: > > https://github.com/SillyTavern/SillyTavern-Extras/blob/0d73db91e745ed22cc2829326acee45139b1a513/server.py#L183 > > Basically if there are modules not found (no matter which module) this will return you > > ``` > except ModuleNotFoundError: > print("Error: Could not import the 'talkinghead' module.") > ``` > > So I did: > > ``` > except Exception as err: > print(err) > print("Error: Could not import the 'talkinghead' module.") > ``` > > And found out I didn't have some modules installed, such as 'scipy", so I went to the requirements-complete and installed it from there. (had to skip a couple of failing ones) As I sad in my last comment, I don't have the "Could not import the 'talkinghead' module." error anymore. Running server.py crashes with ` ImportError: /run/media/ruben/Prime/CharacterAI/SillyTavern-extras/miniconda/envs/extras/bin/../lib/libstdc++.so.6: version GLIBCXX_3.4.32 not found (required by /run/media/ruben/Prime/CharacterAI/SillyTavern-extras/miniconda/envs/extras/lib/python3.11/site-packages/wx/_core.cpython-311-x86_64-linux-gnu.so) ` And I installed all the requirements from requirements-complete, so I don't think it's a problem with python requirements.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SillyTavern/SillyTavern-Extras#82
No description provided.