Skip to content

Commit d994227

Browse files
Update pip installation guide with venv setup
1 parent 19c37b0 commit d994227

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

src/content/_includes/docs/iot-gateway/installation/pip-installation.mdx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,27 @@ Install ThingsBoard IoT Gateway as a Python package using `pip` on Ubuntu or Deb
1414
<Steps>
1515
<ol>
1616
<li>
17-
**Install system libraries.**
17+
**Install required system libraries and the venv module.**
1818

1919
```bash
20-
sudo apt install python3-dev python3-pip libglib2.0-dev
20+
sudo apt update
21+
sudo apt install python3-dev python3-pip python3-venv libglib2.0-dev wget -y
2122
```
2223
</li>
2324
<li>
24-
**Install the ThingsBoard Gateway package.**
25+
**Create and activate a virtual environment.**
2526

2627
```bash
27-
sudo pip3 install thingsboard-gateway
28+
python3 -m venv ~/tb-gateway-env
29+
source ~/tb-gateway-env/bin/activate
30+
```
31+
</li>
32+
<li>
33+
**Install ThingsBoard Gateway inside the virtual environment.**
34+
35+
```bash
36+
pip install --upgrade pip
37+
pip install thingsboard-gateway
2838
```
2939
</li>
3040
<li>
@@ -43,7 +53,6 @@ Install ThingsBoard IoT Gateway as a Python package using `pip` on Ubuntu or Deb
4353
```bash
4454
sudo chown YOUR_USER:YOUR_USER -R /var/log/thingsboard-gateway
4555
sudo chown YOUR_USER:YOUR_USER -R /etc/thingsboard-gateway
46-
sudo chown YOUR_USER:YOUR_USER /tmp
4756
```
4857
</li>
4958
<li>

0 commit comments

Comments
 (0)