0 votos
118 vistas

¡Hola!
En Ubuntu 24.04.2 LTS, tengo PTXprint, la versión de ayer (python3-ptxprint/noble,noble,now 2.8.20-0~20250709~ubuntu24.04.1 all [installed]) y se niega a iniciar. Hace una semana comenzó a ocurrir esto. No tengo el archivo usfmtc en mi sistema.

pc@pc:~/Dokumenti/GitHub/SloKJV/PTXprint$ ptxprint
Traceback (most recent call last):
  File "/usr/bin/ptxprint", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3/dist-packages/ptxprint/main.py", line 145, in main
    from ptxprint.gtkview import GtkViewModel, getPTDir, reset_gtk_direction
  File "/usr/lib/python3/dist-packages/ptxprint/gtkview.py", line 29, in <module>
    from ptxprint.view import ViewModel, Path, VersionStr, GitVersionStr
  File "/usr/lib/python3/dist-packages/ptxprint/view.py", line 3, in <module>
    from ptxprint.texmodel import TexModel, Borders, _periphids
  File "/usr/lib/python3/dist-packages/ptxprint/texmodel.py", line 7, in <module>
    from ptxprint.usxutils import Usfm, Sheets
  File "/usr/lib/python3/dist-packages/ptxprint/usxutils.py", line 2, in <module>
    import usfmtc
ModuleNotFoundError: No module named 'usfmtc'

Instalar desde pip no es de ayuda (Python 3.12.3)

pc@pc:~/Dokumenti/GitHub/SloKJV/PTXprint$ python3 -m pip install usfmtc
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.


    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.


    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.


    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

No puedo encontrar este archivo en GitHub - sillsdev/ptx2pdf: XeTeX based macro package for typesetting USFM formatted (Paratext output) scripture files
https://github.com/sillsdev/ptx2pdf/tree/master

Parece que /usr/lib/python3/dist-packages/ptxprint/usxutils.py lo está usando

==========usxutils.py=======
import re, regex, logging, os, time
import usfmtc
from usfmtc.reference import Ref, RefList
from usfmtc.usfmparser import Grammar
from ptxprint.utils import universalopen, runChanges
from usfmtc.xmlutils import ParentElement, hastext, isempty
from usfmtc.usxmodel import iterusx, addesids
from ptxprint.changes import readChanges
from ptxprint.ptsettings import PTEnvironment
from copy import deepcopy
...
===========================

Traducción automática desde English
PTXprint por (104 puntos)
editado por | 118 vistas

1 Respuesta

0 votos
Necesitamos mejorar esto, probablemente empaquetando usfmtc. Mientras tanto, es seguro romper el bloqueo para esto, ya sea usando la opción de línea de comandos o renombrando /usr/lib/python3.12/EXTERNALLY-MANAGED (o un archivo similar) a otro nombre. Esto permitirá la instalación del paquete.
Traducción automática desde English
por (658 puntos)

Ya funciona. Gracias.

root@pc:/usr/lib/python3.12# oot@pc:/usr/lib/python3.12# mv EXTERNALLY-MANAGED EXTERNALLY-MANAGED_RENAMED
root@pc:/usr/lib/python3.12# python3 -m pip install usfmtc
Collecting usfmtc
  Downloading usfmtc-0.3.12-py3-none-any.whl.metadata (1.2 kB)
Collecting rply (from usfmtc)
  Downloading rply-0.7.8-py2.py3-none-any.whl.metadata (4.2 kB)
Requirement already satisfied: regex in /usr/lib/python3/dist-packages (from usfmtc) (2022.10.31)
Requirement already satisfied: appdirs in /usr/lib/python3/dist-packages (from rply->usfmtc) (1.4.4)
Downloading usfmtc-0.3.12-py3-none-any.whl (83 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 83.7/83.7 kB 1.2 MB/s eta 0:00:00
Downloading rply-0.7.8-py2.py3-none-any.whl (16 kB)
Installing collected packages: rply, usfmtc
Successfully installed rply-0.7.8 usfmtc-0.3.12
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@pc:/usr/lib/python3.12# root@pc:/usr/lib/python3.12# mv EXTERNALLY-MANAGED_RENAMED EXTERNALLY-MANAGED
Traducción automática desde English

Preguntas relacionadas

0 votos
1 respuesta 87 vistas
Estoy usando Ubuntu 25.04 e instalé ptxprint de la siguiente manera: sudo apt install python3-ptxprint Experimento ... esta versión de Python no tiene el atributo _posix_flavour.
bit 495 preguntada oct 8, 2025
0 votos
1 respuesta 205 vistas
Tengo un módulo de leccionario de la Biblia, que tiene sus propias cabeceras \s#. No hay "\inc s" en el ... Pero me pregunto si estoy perdiendo alguna configuración en algún lugar?
beve 131 preguntada abr 10, 2025
0 votos
2 respuestas 296 vistas
En un módulo de la Biblia leccionario, tenemos encabezados con referencias bíblicas. Por ejemplo: \s1 $(JER 33:14-18) La ... salida es la misma. Estoy usando la versión 2.7.29.
beve 131 preguntada abr 16, 2025
0 votos
1 respuesta 204 vistas
Tengo un módulo de la Biblia leccionario y, en PTXPrint, falta el texto de algunos \ref y otros muestran más versículos ... que estoy pasando por alto, sobre párrafos o algo así?
beve 131 preguntada abr 10, 2025
0 votos
1 respuesta 138 vistas
Estamos trabajando en un módulo de la Biblia y actualizamos a la v 2.5.6 para que las notas al pie aparecieran en el PDF ... no se muestran, aunque las notas al pie sí lo hacen.)
anon399461 123 preguntada nov 20, 2024
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Make every effort to keep the unity of the Spirit through the bond of peace.
Ephesians 4:3
3,073 preguntas
6,035 respuestas
5,704 comentarios
2,038 usuarios