0 votes
26 vues

J'ai remarqué que PTXprint est distribué sur Ubuntu 25.04 sous le nom de paquet python3-ptxprint (Modification : c'est incorrect, les dépôts d'Ubuntu n'incluent pas PTXprint. J'ai dû installer python3-ptxprint depuis une autre source). Cela me fait penser que ptxprint est un module Python, qui pourrait être trouvé sur PyPI, mais je ne parviens pas à le trouver.

Si j'exécute pip install ptxprint , j'obtiens cette erreur :

ERROR: Could not find a version that satisfies the requirement ptxprint (from versions: none)
ERROR: No matching distribution found for ptxprint

De même, le lien https://pypi.org/project/ptxprint/ mène à une erreur 404.

ptxprint est-il disponible en tant que paquet Python ? Il serait pratique de pouvoir exécuter ptxprint en mode sans interface graphique (headless) et de l'inclure comme dépendance dans mon application Python.

Traduit automatiquement depuis English
PTXprint par (495 points)
modifié par | 26 vues

2 Réponses

0 votes
Meilleure réponse

PTXprint is not available on PyPI. My guess is that the developers chose not to publish the package on PyPI, because the package has a lot of dependencies that themselves aren't on PyPI (like GTK and TeX Live). So, even if the package was available on PyPI, installation would still be more complicated than just running pip install ptxprint.

There is a GitHub repo for some of the code behind PTXprint here: https://github.com/sillsdev/ptx2pdf . I don't know why it is named ptx2pdf instead of PTXprint. This is linked to by this download page on sil.org.

par (495 points)
+1 vote
The difficulty in making a pypi package is that PTXprint is an application and pypi packaging really doesn't lend itself to including all the supporting data directories that are needed for PTXprint. If you'd like to take a shot at it, I would be interested if you can get anywhere.

Having said that, the pyproject.toml file does lend itself to installing from source. That is: pull the repo and pip install -e . or whatever. If you do that you will get a headless ptxprint installation with no gui extras, if you want gui then you'll need something like pip install -e .[gui] but be warned the gui dependencies are steep and do not lend themselves to being installed by pip, you may be better off using other mechanisms (your package manager) for many of the gui specific dependencies.
par (656 points)

Nice. That means I can add this line to requirements.txt:
git+https://github.com/sillsdev/ptx2pdf@master#egg=ptxprint

Then I can install all the dependencies listed in requirements.txt by running pip install -r requirements.txt.

Alternatively, I can use uv like this: uv add 'ptxprint @ git+https://github.com/sillsdev/ptx2pdf'

Questions connexes

0 votes
2 réponses 325 vues
I'm using PTXprint to create PDFs from a Paratext project in the Arabic language, which is a right-to-left language. ... do I display verse numbers in the margin to the right?
bit 495 posée oct. 27, 2022
0 votes
5 réponses 107 vues
Lorsque je crée pour la première fois un projet dans PTXprint, je peux le lier à un projet PT existant. J'ai ... travail idéal, mais cela arrive parfois.) D'où ma question.
Tim 934 posée avr. 24
0 votes
1 réponse 67 vues
Voici mon problème : Dans la note de bas de page, le traducteur fournit le mot hébreu dans le texte source et ... la taille de la police principale. Comment résoudre ce problème ?
Y Mdu Niê 124 posée mars 10
0 votes
2 réponses 30 vues
Je débute tout juste avec PTXprint. Je souhaite utiliser Paratext, mais, comme j'utilise un Mac, j'attends la sortie de ... 'un bundle depuis un dépôt en ligne ? Merci d'avance.
vikslen 105 posée févr. 5
0 votes
1 réponse 19 vues
Je souhaite utiliser \fm \fm* pour deux appels de note de bas de page dans Jean 5:10 et Jean 5:18, avec ... Juifs dans le contexte de Jean 5 désignent le leadership des Juifs.
Y Mdu Niê 124 posée janv. 24
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Don’t you know that you yourselves are God’s temple and that God’s Spirit dwells in your midst?
1 Corinthians 3:16
3,044 questions
6,003 réponses
5,671 commentaires
2,026 utilisateurs