Raspberry Pi w/ Debian Bookworm #185
santaimpersonator
started this conversation in
Show and tell
Replies: 1 comment
-
I think most of this is already in the README, but good to highlight. Thanks! Feel free to submit a PR to improve any existing installation documentation - contributions always welcome. FYI the /examples folder holds a fairly reliable installation shell script for 64-bit Debian Linux environments, including Rasperry Pi and Ubuntu. (FYI I generally use Ansible to install stuff on a bunch of Raspberry PIs and other Linux machines I use for testing and evaluation purposes. I'd be happy to make the Ansible role more widely available if there's interest, but it's probably a bit too esoteric for most users) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Package Installation
Using the installation instructions, users will be able to install the
PyGPSClient
Python package by following the instructions for a virtual environment.Add the PyGPSClient to
PATH
To make the Python package executable outside of a virtual environment, user will need to locate the directory of the relevant binaries.
Find the Directory
Inside the virtual environment, use the global installation command:
python3 -c "import os,sysconfig;print(sysconfig.get_path('scripts'))"
The command should return the following:
Note
<user>
is theusername
(i.e.pi
is the default username)<venv directory>
is the directory for the virtual environment (i.e.env
is used in the installation instructions)Where, the default response would be:
Then, exit the virtual environment with the following command:
Add the Directory to the
PATH
VariableTo add this directory of the relevant binaries to the
PATH
variable, use the following instructions:Permanent Method
Edit the
~/.profile
file (or create a~/.bash_rc
file):nano ~/.profile
At the bottom of the file, enter the following:
export PATH="$PATH:<value returned>"
Note
Where, default entry would be:
export PATH="$PATH:/home/pi/env/bin/"
Temporary Method
Execute the following commands:
Note
Where, default entry would be:
Verify
To test, try running the Python package from the terminal without a virtual environment.
Note
With the temporary method, the Python package won't be available after the Raspberry Pi has been reset.
Create an Application
Using the instructions for creating an application in Linux.
However, when creating the
pygpsclient.desktop
file, use the following parameters:[Desktop Entry] Type=Application Terminal=false Name=PyGPSClient Icon=/home/<user>/<venv directory>/lib/python3.<minor version>/site-packages/pygpsclient/resources/pygpsclient.ico Exec=/home/<user>/<venv directory>/bin/pygpsclient
Note
Where the following parameter values should be:
<user>
is theusername
(i.e.pi
is the default username)<venv directory>
is the directory for the virtual environment (i.e.env
is used in the installation instructions)<minor version>
- Specify the specific version of Python, don't use*
.As of writing this, Python 3.11 is used so the default entry would be:
[Desktop Entry] Type=Application Terminal=false Name=PyGPSClient Icon=/home/pi/env/lib/python3.11/site-packages/pygpsclient/resources/pygpsclient.ico Exec=/home/pi/env/bin/pygpsclient
In order for this to take effect, users must restart the Raspberry Pi. However, before restarting... users can test that the file was created properly with the following command:
Working Application
If you've followed the information above, PyGPSClient will appear in the application menu. Additionally, users will be able to add shortcuts to the taskbar and desktop.
Beta Was this translation helpful? Give feedback.
All reactions