You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+36-7
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,8 @@ and then run it by typing:
66
66
pygpsclient
67
67
```
68
68
69
+
**NB** If you get `error: externally-managed-environment`, refer to the longer installation guidelines for **virtual environments** using [pip](#pip) or [pipx](#pipx) below.
70
+
69
71
## The Longer Version
70
72
71
73
In the following, `python3` & `pip` refer to the Python 3 executables. You may need to substitute `python` for `python3`, depending on your particular environment (*on Windows it's generally `python`*).
@@ -135,33 +137,50 @@ To access the serial port on most Linux platforms, you will need to be a member
The easiest way to install the latest version of `PyGPSClient` is with [pip](http://pypi.python.org/pypi/pip/):
146
+
The recommended way to install the latest version of `PyGPSClient` is with [pip](http://pypi.python.org/pypi/pip/):
145
147
146
148
```shell
147
149
python3 -m pip install --upgrade pygpsclient
148
150
```
149
151
150
-
If required, `PyGPSClient` can also be installed into a virtual environment, e.g.:
151
-
152
+
If required, `PyGPSClient` can also be installed and run in a [virtual environment](https://www.geeksforgeeks.org/python-virtual-environment/) - this may be necessary if you have an `externally-managed-environment`, e.g.:
152
153
```shell
153
154
python3 -m venv env
154
155
source env/bin/activate # (or env\Scripts\activate on Windows)
155
156
python3 -m pip install --upgrade pygpsclient
157
+
pygpsclient
156
158
```
157
159
158
-
The pip installation process places an executable file `pygpsclient` in the Python binaries folder (`../bin` on Linux & MacOS, `..\Scripts` on Windows). The PyGPSClient application may be started by double-clicking on this executable file from your file manager or, if the binaries folder is in your PATH, by opening a terminal and typing (all lowercase):
160
+
To deactivate the virtual environment:
159
161
160
162
```shell
163
+
deactivate
164
+
```
165
+
166
+
To reactivate and run from the virtual environment:
167
+
```shell
168
+
source env/bin/activate # (or env\Scripts\activate on Windows)
161
169
pygpsclient
162
170
```
163
171
164
-
`pygpsclient` also accepts optional command line arguments for a variety of configurable parameters. These will override any saved configuration file settings. Type the following for help:
172
+
To upgrade PyGPSClient to the latest version from the virtual environment:
173
+
```shell
174
+
source env/bin/activate # (or env\Scripts\activate on Windows)
175
+
python3 -m pip install --upgrade pygpsclient
176
+
```
177
+
178
+
The pip installation process places an executable file `pygpsclient` in the Python binaries folder (`../bin` on Linux & MacOS, `..\Scripts` on Windows). The PyGPSClient application may be started by double-clicking on this executable file from your file manager or, if the binaries folder is in your PATH, by opening a terminal and typing (all lowercase):
179
+
```shell
180
+
pygpsclient
181
+
````
182
+
183
+
`pygpsclient` accepts optional command line arguments for a variety of configurable parameters. These will override any saved configuration file settings. Type the following for help:
4. Virtual Env: `env/bin/pygpsclient` (or `env\Scripts\pygpsclient.exe` on Windows)
207
+
4. Virtual Env: `$ENV/bin/pygpsclient` (or `$ENV\Scripts\pygpsclient.exe` on Windows), where `$ENV` is the full path to your virtual environment.
189
208
190
209
where `**` signifies the Python version e.g. `3.12`.
191
210
211
+
### <a name="pipx">Install using pipx</a>
212
+
213
+
You can also use [pipx](https://pipx.pypa.io/latest/installation/) (_if available_) to install `pygpsclient` into a virtual environment - use the `pipx ensurepath`command to add the relevant Python binaries folder to your PATH.
214
+
215
+
```shell
216
+
pipx ensurepath
217
+
pipx install pygpsclient
218
+
```
219
+
220
+
`pipx` will typically create a virtual environment in the user's local shared folder e.g. `/home/user/.local/share/pipx/venvs/pygpsclient`.
0 commit comments