Ask me anything!

Have a question you always wanted to ask Moonchild but never did? Now's your chance!
From 2026-03-08 to 2026-03-15 I'll be open to any question by the community, after which I'll provide answers.

Go here to participate: https://forum.palemoon.org/viewtopic.php?f=66&t=33222

Building Epyrus with Python 3.x Problem

Board for discussions around the Epyrus mail and news client.

Moderator: athenian200

User avatar
geraldh
Apollo supporter
Apollo supporter
Posts: 47
Joined: 2022-06-18, 16:19
Location: Citizen of Europe

Building Epyrus with Python 3.x Problem

Post by geraldh » 2026-02-07, 12:13

Now that an updated version of Epyrus is available I'd like to build a gtk2 version, as I much prefer the gtk2 interface and I have a theme that works well with it. I successfully built the earlier version of Epyrus on Mint 21 which had Python 2.7. I am now on Mint 22 which comes with Python 3.x which has deprecated commands needed to build Epyrus, so I am getting errors such as "ModuleNotFoundError: No module named 'imp'.

This issue is mentioned in the Palemoon build instructions which under the title "Debian 12 or later" suggests adding
"deb http://archive.debian.org/debian/ stretch contrib main non-free".

Stretch is a much earlier version of Debian and not appropriate for Mint 22 which I understand is based on Trixie and so this solution still does not allow me to install Python 2.7. Is there a way of building Epyrus on modern Linux distributions that have Python 3.X? Thank you.

User avatar
jobbautista9
Board Warrior
Board Warrior
Posts: 1149
Joined: 2020-11-03, 06:47
Location: Philippines

Re: Building Epyrus with Python 3.x Problem

Post by jobbautista9 » 2026-02-07, 12:44

Adding Debian 9 (or 10 which also has 2.7.x) to your apt repos should be fine. apt will still prioritize Mint 22's repos for packages while allowing you to install Python 2.7.
Image

Tired of creating stuff!

Avatar artwork by Shinki669: https://www.pixiv.net/artworks/113645617

XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1637
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Building Epyrus with Python 3.x Problem

Post by athenian200 » 2026-02-07, 16:21

Unfortunately, building Epyrus on Linux is dependent on Python 2.x being available due to the mach build system we inherited from Firefox, as far as I know. This is actually a UXP-wide problem and affects Pale Moon as well.

At this point it would probably be easier to use a Docker image or a virtual machine with Oracle Linux 8 to build Epyrus. I've only ever built Epyrus on Oracle Linux, never tested against Debian, Mint, or Ubuntu. Though to be fair I also don't test GTK2, and would hope themes will be adjusted for GTK3.
Off-topic:
By the way, I was reading an article suggesting that GTK2 is likely also on the chopping block for Debian and its derivatives, I hear Forky is planning to drop it.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
geraldh
Apollo supporter
Apollo supporter
Posts: 47
Joined: 2022-06-18, 16:19
Location: Citizen of Europe

Re: Building Epyrus with Python 3.x Problem

Post by geraldh » 2026-02-09, 19:46

Thanks to both of you for your advice on this. I have now cracked it and have a gtk2 version of Epyrus 2.2.0 running. I installed Mint 20.3 on a virtual machine and managed to build it on that after a few false starts (Mint 21.x doesn't work).

The virtual machine does need around 30GB free to build it. I ran it on a host with 16GB of ram and it took around 40 mins on my 4th gen i7 desktop. Seems to work perfectly with the Interlink theme and to my eyes at least looks much nicer than the gtk3 version.

I am aware that gtk2 is on the way out, but I'll keep using it for as long as I can and I then may then switch to a QT Linux Distro. I'm happy to pass on the gtk2 version if anyone wants it, but I don't think it's as simple as that :) .

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1637
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Building Epyrus with Python 3.x Problem

Post by athenian200 » 2026-03-03, 04:01

So, I should probably thank you. Thinking about this post kind of made me feel weird about the fact that my e-mail client still requires outdated tools like Python 2 to build, but I don't offer a GTK2 version. And in general made me think more about how inaccessible Epyrus development is becoming for the average Linux user. And that feeling... motivated me to do this.

https://repo.palemoon.org/athenian200/e ... ch/python3

https://repo.palemoon.org/athenian200/U ... hon3-dirty

The Python 3 port is currently in a very experimental state and is full of odd debug prints, hasn't been tested on a variety of platforms (only Windows 10 and Fedora Linux so far), doesn't really have a proper commit history as I was mostly experimenting at first, not sure how far I would get... but anyway, this branch of UXP can be used for a Python 3 build of Epyrus in a pinch. I have no idea when or if a cleaned-up version of this could be incorporated into the real UXP, but it does exist.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
Basilisk-Dev
Astronaut
Astronaut
Posts: 562
Joined: 2022-03-23, 16:41
Location: Chamber of Secrets

Re: Building Epyrus with Python 3.x Problem

Post by Basilisk-Dev » 2026-03-03, 18:07

athenian200 wrote:
2026-02-07, 16:21
At this point it would probably be easier to use a Docker image or a virtual machine with Oracle Linux 8 to build Epyrus. I've only ever built Epyrus on Oracle Linux, never tested against Debian, Mint, or Ubuntu. Though to be fair I also don't test GTK2, and would hope themes will be adjusted for GTK3.
That's what I do on Linux. Feel free to try it out. I've built Pale Moon and Epyrus in this setup before.
https://repo.palemoon.org/Basilisk-Dev/ ... ipts/linux
Basilisk Project Owner

viewtopic.php?f=61&p=230756

User avatar
Moonchild
Project founder
Project founder
Posts: 38957
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Building Epyrus with Python 3.x Problem

Post by Moonchild » 2026-03-03, 23:40

On a related note if I do build Linux binaries (like I've done this release, and in some *nix debugging sessions) I use WSL (Windows Subsystem for Linux) which is basically a tightly-integrated virtual machine/container in Windows that even allows me to spin up Linux applications in regular windows (running an Xserver for the GUI). I use devtoolset-11 on oracle Linux 8 to have a modern gcc toolchain at my disposal and it Just Works™ -- VirtualBox and VMWare were my go-tos previously but they are considerably slower than WSL.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
andyprough
Board Warrior
Board Warrior
Posts: 1300
Joined: 2020-05-31, 04:33

Re: Building Epyrus with Python 3.x Problem

Post by andyprough » 2026-03-04, 03:01

Moonchild wrote:
2026-03-03, 23:40
On a related note if I do build Linux binaries (like I've done this release, and in some *nix debugging sessions) I use WSL (Windows Subsystem for Linux) which is basically a tightly-integrated virtual machine/container in Windows that even allows me to spin up Linux applications in regular windows (running an Xserver for the GUI). I use devtoolset-11 on oracle Linux 8 to have a modern gcc toolchain at my disposal and it Just Works™ -- VirtualBox and VMWare were my go-tos previously but they are considerably slower than WSL.
It's just like using kvm on a GNU/Linux distro I would imagine - virtualization that is natively built into the kernel like kvm and wsl should be much more efficient.