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

[BUG] ModuleNotFoundError: No module named 'typing' #3334

Closed
2 tasks done
AlanMW opened this issue Apr 16, 2024 · 4 comments
Closed
2 tasks done

[BUG] ModuleNotFoundError: No module named 'typing' #3334

AlanMW opened this issue Apr 16, 2024 · 4 comments

Comments

@AlanMW
Copy link

AlanMW commented Apr 16, 2024

Describe the bug
I am getting the following error when attempting to use rich:
ModuleNotFoundError: No module named 'typing'

File "/home/user/Text_Gen/text-generation-webui-main/installer_files/env/lib/python3.11/site-packages/rich/__init__.py", line 4, in <module>
  from typing import IO, TYPE_CHECKING, Any, Callable, Optional, Union
ModuleNotFoundError: No module named 'typing'

Platform

Click to expand

Linux, ssh from windows cmd prompt

I may ask you to copy and paste the output of the following commands. It may save some time if you do it now.

If you're using Rich in a terminal:

python -m rich.diagnose
pip freeze | grep rich
(/home/user/Text_Gen/text-generation-webui-main/installer_files/env) user@userserver:~$ python -m rich.diagnose
Traceback (most recent call last):
  File "<frozen runpy>", line 189, in _run_module_as_main
  File "<frozen runpy>", line 112, in _get_module_details
  File "/home/user/Text_Gen/text-generation-webui-main/installer_files/env/lib/python3.11/site-packages/rich/__init__.py", line 4, in <module>
    from typing import IO, TYPE_CHECKING, Any, Callable, Optional, Union
ModuleNotFoundError: No module named 'typing'
(/home/user/Text_Gen/text-generation-webui-main/installer_files/env) user@userserver:~$ pip freeze | grep rich
Traceback (most recent call last):
  File "/home/user/Text_Gen/text-generation-webui-main/installer_files/env/bin/pip", line 7, in <module>
    from pip._internal.cli.main import main
  File "/home/user/Text_Gen/text-generation-webui-main/installer_files/env/lib/python3.11/site-packages/pip/__init__.py", line 1, in <module>
    from typing import List, Optional
ModuleNotFoundError: No module named 'typing'
Copy link

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

@TomJGooding
Copy link

I'm afraid you have a problem with your Python environment, this isn't a Rich issue. Notice that trying to run just the pip freeze command gave you the same error.

@willmcgugan
Copy link
Collaborator

The typing module is in the standard library. If that doesn't exist then something is amis with your environment, as Tom pointed out. Try recreating your virtual environement?

Copy link

I hope we solved your problem.

If you like using Rich, you might also enjoy Textual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants