Skip to content

UV: Failed to spawn textual: No such file or directory (os error 2) #5749

@EnhancedJax

Description

@EnhancedJax

Setting up a UV python project, I was unable to run the textual tool. The following is an attempt at installing and running textual using UV:

Image

Traceback on running the module directly: uv run .venv/lib/python3.13/site-packages/textual

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/jax/Documents/Work/test/.venv/lib/python3.13/site-packages/textual/__main__.py", line 1, in <module>
    from textual.demo.demo_app import DemoApp
  File "/Users/jax/Documents/Work/test/.venv/lib/python3.13/site-packages/textual/__init__.py", line 18, in <module>
    from textual._on import on
  File "/Users/jax/Documents/Work/test/.venv/lib/python3.13/site-packages/textual/_on.py", line 5, in <module>
    from textual.css.model import SelectorSet
  File "/Users/jax/Documents/Work/test/.venv/lib/python3.13/site-packages/textual/css/model.py", line 10, in <module>
    from textual.css._help_renderables import HelpText
  File "/Users/jax/Documents/Work/test/.venv/lib/python3.13/site-packages/textual/css/_help_renderables.py", line 6, in <module>
    from rich.console import Console, ConsoleOptions, RenderResult
  File "/Users/jax/Documents/Work/test/.venv/lib/python3.13/site-packages/rich/console.py", line 50, in <module>
    from ._log_render import FormatTimeCallable, LogRender
  File "/Users/jax/Documents/Work/test/.venv/lib/python3.13/site-packages/rich/_log_render.py", line 5, in <module>
    from .text import Text, TextType
  File "/Users/jax/Documents/Work/test/.venv/lib/python3.13/site-packages/rich/text.py", line 22, in <module>
    from .align import AlignMethod
  File "/Users/jax/Documents/Work/test/.venv/lib/python3.13/site-packages/rich/align.py", line 10, in <module>
    from .constrain import Constrain
  File "/Users/jax/Documents/Work/test/.venv/lib/python3.13/site-packages/rich/constrain.py", line 3, in <module>
    from .jupyter import JupyterMixin
  File "/Users/jax/Documents/Work/test/.venv/lib/python3.13/site-packages/rich/jupyter.py", line 7, in <module>
    from .segment import Segment
  File "/Users/jax/Documents/Work/test/.venv/lib/python3.13/site-packages/rich/segment.py", line 4, in <module>
    from logging import getLogger
  File "/Users/jax/Documents/Work/test/.venv/lib/python3.13/site-packages/textual/logging.py", line 10, in <module>
    from logging import Handler, LogRecord
ImportError: cannot import name 'Handler' from 'logging' (consider renaming '/Users/jax/Documents/Work/test/.venv/lib/python3.13/site-packages/textual/logging.py' since it has the same name as the standard library module named 'logging' and prevents importing that standard library module)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions