Skip to content

Commit fd7b8aa

Browse files
committed
update in readme met uitleg python/python3 en -m
1 parent 076416e commit fd7b8aa

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,31 @@ sudo apt-get install sense-hat
2525
sudo pip install adafruit_circuitpython-ads1x15 adafruit-circuitpython-mcp3xxx
2626
```
2727

28+
### Raspberrypi
29+
De raspberrypi maakt standaard gebruik van python2. Om voor python3 (de Python versie die je voor je eigen code wilt gebruiken!) de modules te installeren moet de juiste python gebruikt worden om de modules te installeren. Het commando om bijvoorbeeld de adafruit libraries met pip te installeren wordt dan:
30+
```console
31+
sudo python3 -m pip install adafruit_circuitpython-ads1x15 adafruit-circuitpython-mcp3xxx
32+
```
33+
34+
Door Python (python3) met de -m optie aan te roepen is het volgende argument de module die uitgevoerd moet worden. Zo weet je altijd dat de juiste python-interpreter gebruikt wordt om PyPi packages te installeren.
35+
2836
### Installatie via PyPi
2937
Als PyPi aanwezig is kan via [PyPi](https://pypi.org/project/TN-code) de software voor de huidge gebruiker geinstalleer worden:
3038
```console
31-
pip install tn_code
39+
python -m pip install tn_code
3240
```
3341
Om system-wide (voor alle gebruikers te installeren:
3442
```console
35-
sudo pip install tn_code
43+
sudo python -m pip install tn_code
3644
```
3745

3846
Als virtual environment
3947
```console
4048
mkdir project-naam && cd project-naam
4149
python -m venv .env
4250
source .env/bin/activate
43-
pip install tn_code
51+
python -m install tn_code
4452
```
53+
Daarna moet, om gebruik te maken van het virtuele environment, bij het opstarten het environmet geactiveerd worden
54+
55+

0 commit comments

Comments
 (0)