0 votes
20 views

I noticed that PTXprint is distributed on Ubuntu 25.04 under the package name python3-ptxprint (Edit: this is incorrect, Ubuntu's repositories do not include PTXprint. I must have installed python3-ptxprint from another source). This makes me think that ptxprint is a Python module, that could be found on PyPI, but I can't find it.

If I run pip install ptxprint , I get this error:

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

Likewise, the link https://pypi.org/project/ptxprint/ leads to a 404 error.

Is ptxprint available as a Python package? It would be handy to be able to run ptxprint headlessly, and to include it as a dependency in my Python application.

PTXprint by (495 points)
edited by | 20 views

2 Answers

0 votes
Best answer

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.

by (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.
by (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'

Related questions

0 votes
2 answers 299 views
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 asked Oct 27, 2022
0 votes
5 answers 88 views
When I first create a project in PTXprint I can link it to an existing PT-project. I have noticed that sometimes ... , but it happens sometimes.) Hence my question came up.
Tim 934 asked Apr 24
0 votes
1 answer 52 views
This is my problem: In the footnote, the translator provides the Hebrew word in source text and its range of meaning. The ... the size of the main font. How to solve this problem?
Y Mdu Niê 124 asked Mar 10
0 votes
2 answers 24 views
I am just getting started with PTXprint. I do want to use Paratext but, as I am using a Mac, I am waiting ... downloading a bundle from an online repository? Please and thank you.
vikslen 105 asked Feb 5
0 votes
1 answer 17 views
I want to use \fm \fm* for two footnote callers in John 5:10 and John 5:18 with the same keyword in the main text ... Jews in the context of John 5 is the leadership of the Jews.
Y Mdu Niê 124 asked Jan 24
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
I appeal to you, brothers and sisters, in the name of our Lord Jesus Christ, that all of you agree with one another in what you say and that there be no divisions among you, but that you be perfectly united in mind and thought.
1 Corinthians 1:10
3,037 questions
5,994 answers
5,661 comments
2,022 users