Skip to content

Commit 9345745

Browse files
Update README.md with venv/pip3 installation instructions
1 parent fbeaf2e commit 9345745

File tree

1 file changed

+9
-27
lines changed

1 file changed

+9
-27
lines changed

README.md

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -52,43 +52,25 @@ The first step to using this package is installing it on your system. The instal
5252

5353
### Python
5454

55-
The package is primarily installed using the `pip` command, downloading the package from the Python Index - "PyPi". Note - the below instructions outline installation an Linux-based (Raspberry Pi) system.
55+
The package is primarily installed using the `pip3` command, downloading the package from the Python Index - "PyPi". Note - the below instructions outline installation an Linux-based (Raspberry Pi) system.
5656

5757
#### PyPi Installation
5858

59-
The SparkFun Qwiic SerLCD Python package is part of the overall SparkFun Qwiic Python package which is hosted on PyPi. On systems that support PyPi installation via pip, this library is installed using the following commands
59+
The SparkFun Qwiic SerLCD Python package is part of the overall SparkFun Qwiic Python package which is hosted on PyPi. On systems that support PyPi installation via pip, this library is installed using the following commands.
6060

61-
For all users (note: the user must have sudo privileges):
61+
First, setup a virtual environment from a specific directory using venv:
6262
```sh
63-
sudo pip install sparkfun-qwiic
63+
python3 -m venv path/to/venv
6464
```
65-
For the current user:
65+
You can pass any path as path/to/venv, just make sure you use the same one for all future steps. For more information on venv [click here](https://docs.python.org/3/library/venv.html).
6666

67+
Next, install the qwiic package with:
6768
```sh
68-
pip install sparkfun-qwiic
69+
path/to/venv/pip3 install sparkfun-qwiic-serlcd
6970
```
70-
---
71-
---
72-
> [!CAUTION]
73-
> **TODO** Put together how this works with the new virtual environments used with the latest Python install
74-
---
75-
---
76-
#### Local Installation
77-
To install, make sure the setuptools package is installed on the system.
78-
79-
Direct installation at the command line:
71+
Now you should be able to run any example or custom python scripts that have `import qwiic_serlcd` by running e.g.:
8072
```sh
81-
python setup.py install
82-
```
83-
84-
To build a package for use with pip:
85-
```sh
86-
python setup.py sdist
87-
```
88-
A package file is built and placed in a subdirectory called dist. This package file can be installed using pip.
89-
```sh
90-
cd dist
91-
pip install sparkfun_qwiic_serlcd-<version>.tar.gz
73+
path/to/venv/python3 example_script.py
9274
```
9375

9476
#### MicroPython Installation

0 commit comments

Comments
 (0)