ChirpOnLinux » History » Revision 41
Revision 40 (Dan Smith, 06/01/2024 09:22 AM) → Revision 41/45 (Dan Smith, 06/02/2024 06:43 AM)
# 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 ``` $ sudo apt install python3-wxgtk4.0 pipx ``` ### **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. ``` $ sudo dnf install python3-wxpython4 pipx ``` ## 2. Install CHIRP (and Python dependencies) Download the [chirp-yyyymmdd-py3-none-any.whl file](https://archive.chirpmyradio.com/chirp_next/) located under the folder corresponding to the latest date. The next steps should work for all versions of Linux using pip, assuming you have the base dependencies from the distro installed above. On all recent distros, you must use `pipx` to install CHIRP separated from the system python environment. However, because some libraries from the system environment are required (packages from above) you must use the flag to enable their use. Use of the wheel download is recommended. ``` $ pipx install --system-site-packages ./chirp-yyyymmdd-py3-none-any.whl ``` **NOTE:** Use the filename you actually downloaded (ex: chirp-20240522-py3-none-any.whl), the above is just an example. ## 3. Run CHIRP Now you can run CHIRP once from the command line with: ``` $ ~/.local/bin/chirp ``` The first time CHIRP is launched it should pop up a prompt to add a `.desktop` file for the current user. Select **yes** if you want to have the icon installed into the application menu (the *activities* menu in gnome) to launch CHIRP. If you want to run CHIRP from the command line and simply using `chirp` does not work please check your `PATH` to verify it is complete. If not that can be fixed by editing `~/.bashrc` or `~/.bash_profile` to add that to the existing `$PATH`. If the `PATH` is configured properly then CHIRP should be able to launch with the `chirp` command. Common locations would be `~/.local/bin` and `/usr/local/bin`. Following the steps above (without `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. ## 4. Update CHIRP Once CHIRP is properly installed, upgrades to newer versions are done with two simple steps: 1. Download the newer file. 1. Uninstall the old version: `pipx uninstall chirp` 1. Install the updated version by re-doing step 2 above # Troubleshooting ## 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 the USB port of your device, and then the following command should add your user to the proper group: Note that "ttyUSB0" should be replaced with the actual device that identifies your connection to the radio and that "$USER" is a system variable that identifies the username of the individual running the command. ``` sudo usermod -a -G $(stat -c %G /dev/ttyUSB0) $USER ``` If that made a change, 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 ``` This is only recommended for older distros, like Ubuntu 20.04. 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. ## Python or other version requirements If you are running on an older distro, you may see complaints about either the python version or other system libraries being too old, such as the following: ``` ERROR: Package 'chirp' requires a different Python: 3.9.2 not in '<4,>=3.10' ``` In general, we try to keep in mind the versions of packages available in current and recent distro releases and try not to push the requirements past those points unless we need to. But, if you see something like the above, then you likely need to update to a newer distro release. You can find some version specifics [here](https://github.com/kk7ds/chirp/blob/master/requirements.txt) and [here](https://github.com/kk7ds/chirp/blob/master/setup.py).