Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save AnythingLinux/c75f664345a0c23cbf5a7588837ba305 to your computer and use it in GitHub Desktop.

Select an option

Save AnythingLinux/c75f664345a0c23cbf5a7588837ba305 to your computer and use it in GitHub Desktop.
Install Pronterface Ubuntu
Install python and pip:
apt install snapd
snap install python38 --classic
apt install python3-pip
nano ~/.bashrc
# Add into the bottom
alias python=python3
alias pip=pip3
# Save & Exit ctrl+s and ctrl+x
alias python=python3
alias pip=pip3
source ~/.bashrc
sudo apt update
sudo apt upgrade -y
python --version
pip --version
Install the required dependencies:
sudo apt install python3 python3-pip python3-serial python3-wxgtk4.0 git
Clone the Printrun repository from GitHub to get the latest version:
git clone https://github.com/kliment/Printrun.git
cd Printrun
pip3 install -r requirements.txt
python3 pronterface.py
This should start the Pronterface GUI, and you should be able to connect to your 3D printer and start using it. If you encounter any issues, please let me know!
@CharlesGibbsNam

CharlesGibbsNam commented Jul 7, 2024 •

Copy link
Copy Markdown

Hi, Sorry to bother.

I have Ubuntu 24.04 installed.

After running line 25 I get the following:

`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.
`
Running line 26 gives me the following:

/home/charlesg/Printrun/printrun/pronterface.py:2099: SyntaxWarning: invalid escape sequence '\d' self.sdfiles.append(re.sub(" \d+$", "", line.strip().lower())) # NOQA /home/charlesg/Printrun/printrun/pronsole.py:61: SyntaxWarning: invalid escape sequence '\d' tempreading_exp = re.compile('\\bT\d*:') /home/charlesg/Printrun/printrun/pronsole.py:201: SyntaxWarning: invalid escape sequence '\d' self.lineignorepattern=re.compile("ok ?\d*$|.*busy: ?processing|.*busy: ?heating|.*Active Extruder: ?\d*$") /home/charlesg/Printrun/printrun/pronsole.py:1140: SyntaxWarning: invalid escape sequence '\d' self.sdfiles.append(re.sub(" \d+$","",line.strip().lower())) Traceback (most recent call last): File "/home/charlesg/Printrun/pronterface.py", line 30, in <module> from printrun.pronterface import PronterApp File "/home/charlesg/Printrun/printrun/pronterface.py", line 32, in <module> from . import pronsole File "/home/charlesg/Printrun/printrun/pronsole.py", line 32, in <module> from platformdirs import user_cache_dir, user_config_dir, user_data_dir ModuleNotFoundError: No module named 'platformdirs'
Help please. I am a noob to Linux.. And I do not understand ANY of this, I have followed this GIT to the T.

Regards
Charles

@brosskgm

brosskgm commented Oct 3, 2024

Copy link
Copy Markdown

Hi Charles,

I got the same error listed above after running

pip3 install -r requirements.txt -- Doesn't look like he going to respond or doesn't have an answer to fix.

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.

@Hollebeke

Copy link
Copy Markdown

jai rien compris?

@JacSjoerd

Copy link
Copy Markdown

After line 24 setup a virtual environment with:
python -m venv venv
Enter the virtual environment with:
source venv\bin\activate

Then continue with line 25.

P.S. to leave/deactivate the virtual environment type:
deactivate

@LegoPink

LegoPink commented May 7, 2025

Copy link
Copy Markdown

I also run into a problem on line 25.
I've managed to setup and enter a virtual envormont with
python -m venv venv source venv/bin/active

but now line 25
pip install -r requirements.txt
complains about something else:
`dbus-gmain| Run-time dependency dbus-1 found: NO (tried pkgconfig and cmake)

  ../subprojects/dbus-gmain/meson.build:107:11: ERROR: Dependency "dbus-1" not found, tried pkgconfig and cmake

`

any suggestions?

@Miguellite

Copy link
Copy Markdown

I also run into a problem on line 25. I've managed to setup and enter a virtual envormont with python -m venv venv source venv/bin/active

but now line 25 pip install -r requirements.txt complains about something else: `dbus-gmain| Run-time dependency dbus-1 found: NO (tried pkgconfig and cmake)

  ../subprojects/dbus-gmain/meson.build:107:11: ERROR: Dependency "dbus-1" not found, tried pkgconfig and cmake

`

any suggestions?

Lego, you need to install the libdbus-1 package. I ran the following line to install the dependencies:

sudo apt install libdbus-1-dev pkg-config build-essential

I then had another error with GTK+3 missing, which prompted me to install it with:

sudo apt install libgtk-3-dev

and then I could successfully run line 25.

@Hollebeke

Copy link
Copy Markdown

toujours rien compris je crois que je vais reinstaller Windows vue les explication abracadabrantej'ai jamais vue ca?

@DomoVlas

Copy link
Copy Markdown

i dont know but not working

dominik@Dominik:~/Printrun$ python3 pronterface.py
Traceback (most recent call last):
File "/home/dominik/Printrun/pronterface.py", line 30, in
from printrun.pronterface import PronterApp
File "/home/dominik/Printrun/printrun/pronterface.py", line 32, in
from . import pronsole
File "/home/dominik/Printrun/printrun/pronsole.py", line 33, in
import platformdirs
ModuleNotFoundError: No module named 'platformdirs'

@gchassink-gif

gchassink-gif commented Apr 12, 2026 •

Copy link
Copy Markdown

I think something changed again in Ubuntu 24.04 since I get a
wxPython >=4 is not installed error
And
ImportError: libSDL2-2.0.so.0 cannot open shared objectfile....

@gchassink-gif

Copy link
Copy Markdown

Inloggen
AI-modus
Alle
Video's
Afbeeldingen
Korte video's
Nieuws
Web
Meer
Tools
Looking for results in English?
Change to English
Nederlands blijven gebruiken
Taalinstellingen
AI-overzicht
Installing Printrun (which includes Pronterface, Pronsole, and Printcore) on Linux using Anaconda is a reliable way to manage dependencies without interfering with your system Python. Printrun is a 3D printing host software suite, written in Python.
Here is the guide to setting up Printrun in a Linux Anaconda environment.
Prerequisites

Anaconda or Miniconda installed on your Linux system.
Git installed (sudo apt install git on Ubuntu/Mint). 

Step-by-Step Installation

Create a Dedicated Conda Environment
It is highly recommended to create a new environment to avoid dependency conflicts.
bash

conda create -n printrun python=3.10
conda activate printrun

Download Printrun Source Code
Clone the latest repository to your home directory.
bash

cd ~
git clone https://github.com/kliment/Printrun.git
cd Printrun

Install Dependencies
Printrun requires several libraries, including wxPython for the graphical interface (Pronterface). Inside your activated conda environment, install the necessary packages:
bash

# Install dependencies via conda
conda install -c conda-forge pyserial wxpython pyglet

If you experience issues, you may need to install dbus libraries using your system package manager: sudo apt install libdbus-glib-1-dev.
Install Printrun
Run the setup script to install Printrun into your conda environment:
bash

python -m pip install .

Run Printrun (Pronterface)
With the printrun conda environment activated, you can launch the software:
bash

python pronterface.py

Alternative: Direct System Install (No Anaconda)
If you do not wish to use Anaconda, you can install directly on Ubuntu/Debian/Mint via terminal:
bash

sudo apt update
sudo apt install printrun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment