ChirpOnLinux » History » Revision 18
Revision 17 (Jeffrey Vian, 03/22/2023 12:09 PM) → Revision 18/45 (Dan Smith, 03/22/2023 02:02 PM)
# Running CHIRP on Linux {{>toc}} This page describes how to get the newer python3-based CHIRP-next running on Linux. ## 1. Install distro packages ### Debian, Ubuntu, Mint, Raspbian, etc Install prerequisite packages: ``` $ sudo apt install git python3-wxgtk4.0 python3-serial python3-six python3-future python3-requests python3-pip ``` ### ## **Fedora and compatible** This was tested on Fedora 37 with python 3.11. The same procedure should work on all current versions of fedora running python3. Install prerequisite packages: ``` sudo dnf install python3-pip python3-wxpython4 ``` ## 2. Install CHIRP The next steps should work for all versions of Linux linux using pip, assuming you have the base dependencies from the distro installed above. pip. Use `pip` pip to install the following packages as your regular user. ``` pip install wheel attrdict3 ``` Download the latest `.tar.gz` .tar.gz file then install it with `pip`. For example: ``` pip install chirp-20230322.tar.gz ``` Now you can run chirp once test it from the command line with: with ``` python3 -mchirp.wxui chirp ``` If that does not work try ``` ~/.local/bin/chirp ``` The executable is installed as ~/.local/bin/chirp (or as /usr/local/bin/chirp if sudo was used to do the install). The first time chirp is launched from the command line it should pop up a prompt to add a `.desktop` file for the current user. .desktop file. Select **yes** "yes" if you want to have the icon installed into on the application activities menu (the *activities* menu in gnome) to launch chirp. If you want to run chirp from the command line and simply using `chirp` "chirp" does not work please check your `PATH` path to verify it is complete. The command `echo $PATH` "echo $PATH" should show "`/home/<username>/.local/bin:`" at the `bin` directory where `chirp` is installed. beginning. If not that can be fixed by editing `~/.bashrc` ~/.bashrc or `~/.bash_profile` ~/.bash_profile to add that to the existing `$PATH`. $PATH. If the `PATH` path is configured properly then chirp should be able to launch with the `chirp` "chirp" command. Common locations would Note that the device used as the comm port may be `~/.local/bin` either /dev/ttyUSB0 or /dev/ttyACM0 so the user might need to verify which port is available. Chirp does not seem to automatically detect the /dev/ttyACM0 port so the user may need to select the 'custom' port and `/usr/local/bin`. enter it manually. Following the steps above (without `sudo`) sudo) installs the app as a user level app and it will only be accessible to that user. Using `sudo` for a system-wide installation is deprecated and not recommended on modern distros. Once chirp is properly installed, upgrades to newer versions are done with two simple steps: 1. Download download the newer `.tar.gz file`. .tar.gz file. 2. Run `pip install --upgrade chirp-<version>.tar.gz` ## 3. Serial port permissions Note that you may need to add your users who want to use CHIRP to the group that owns the serial ports. This issue is often indicated by an "access denied" error when accessing serial port. First determine Determine the USB port group ownership of your device, and then the following command should serial port like this (assuming `ttyUSB0`): ``` $ stat -c %G /dev/ttyUSB0 dialout ``` Now you need to add your user to the proper group: that group. On most Linux distros this is accomplished with: ``` sudo usermod -a -G $(stat -c %G /dev/ttyUSB0) dialout $USER ``` If that made a change, you Be sure to use whatever group the above `stat` command reported. You will then need to log out and back in (or maybe even reboot) for it to take effect. ### (Optional) Newer `wxPython` You may want to install a newer wxPython, depending on what your distro ships. For Debian-derived distros (including Ubuntu and Mint) you can do that with a command like: ``` pip3 install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04 wxPython ``` Check the [directory listing](https://extras.wxpython.org/wxPython4/extras/linux/gtk3/) for other distro versions and use the closest match to what you're on. **NOTE** that this will not work for non-x86_64 machines (like the Raspberry Pi) as there are no binary builds for those platforms.