Linux
Install Python
I highly recommend using the latest version of Python, which at the time of writing is 3.11. Anything 3.10 or higher should suffice, but the latest version is recommended.
If you’ve already got Python 3.10 or higher, then you just need to find out whether you use
python
, python3
, or python3.X
(where X
is a number) in the shell (use python -V
to check). We’ll need that for later.
johndoe@pc-name:~$ python -V
3.11.0
If you don’t already have Python 3.10 or newer, download the latest release from python.org. For Linux, you’ll need to download the source tarball.
I highly recommend installing Python to your home directory to avoid messing with any other
installations, so you’ll need to add ~/.local/bin
to your $PATH
if it’s not already there.
Replace ~/.bashrc
with whatever shell config file you use.
johndoe@pc-name:~$ echo "$PATH"
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
johndoe@pc-name:~$ mkdir -p ~/.local/bin
johndoe@pc-name:~$ echo 'PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
johndoe@pc-name:~$ . ~/.bashrc
johndoe@pc-name:~$ echo "$PATH"
/home/johndoe/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
Before compiling Python from source, you may need to install some dependencies. Please read the Python devguide and install all the dependencies listed for your distro.
Then you can compile Python with the following commands:
johndoe@pc-name:~$ cd ~/Downloads
johndoe@pc-name:~/Downloads$ tar xf Python-3.11.0.tgz
johndoe@pc-name:~/Downloads$ cd Python-3.11.0
johndoe@pc-name:.../Python-3.11.0$ ./configure --prefix=$HOME/.local --enable-optimizations
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
etc...
johndoe@pc-name:.../Python-3.11.0$ make && make altinstall
Running code to generate profile data (this can take a while):
etc...
Get the lintrans source code
Go to the release page on GitHub. Download the source code tarball and run the following commands:
johndoe@pc-name:~$ cd ~/Downloads
johndoe@pc-name:~/Downloads$ tar xf lintrans-0.4.1.tar.gz
johndoe@pc-name:~/Downloads$ cd lintrans-0.4.1
johndoe@pc-name:~/Downloads/lintrans-0.4.1$
Compile the program
Using whichever version of Python is the latest version for you, run the following commands to install all the dependencies and compile lintrans.
johndoe@pc-name:~/Downloads/lintrans-0.4.1$ python -m venv venv
johndoe@pc-name:~/Downloads/lintrans-0.4.1$ ./venv/bin/pip install -e .[compile]
Obtaining file:///home/johndoe/Downloads/lintrans-0.4.1
Installing build dependencies ...
etc...
johndoe@pc-name:~/Downloads/lintrans-0.4.1$ ./venv/bin/python compile.py
Created Compiler(filename=lintrans, version_name=0.4.1, platform=linux)
Compiling for platform=linux
etc...
You should now have an executable file called lintrans
in the current directory. I would
recommend moving this file, either to your desktop or some other folder where you keep small
programs, and then you can delete the lintrans-0.4.1
folder from your
Downloads folder.
Thank you for installing lintrans! If you had any issues with the installation or have any questions about the app, don’t hesitate to report a bug or email me directly at .