8000 updated install instructions per @juliogonzalez suggestions · adafruit/Adafruit_Python_DHT@f66c1ca · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Nov 12, 2019. It is now read-only.

Commit f66c1ca

Browse files
author
Brennen Bearnes
committed
updated install instructions per @juliogonzalez suggestions
1 parent 05c3cfe commit f66c1ca

File tree

1 file changed

+47
-17
lines changed

1 file changed

+47
-17
lines changed

README.md

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,85 @@
11
Adafruit Python DHT Sensor Library
22
==================================
33

4-
Python library to read the DHT series of humidity and temperature sensors on a Raspberry Pi or Beaglebone Black.
4+
Python library to read the DHT series of humidity and temperature sensors on a
5+
Raspberry Pi or Beaglebone Black.
56

6-
Designed specifically to work with the Adafruit DHT series sensors ----> https://www.adafruit.com/products/385
7+
Designed specifically to work with the Adafruit DHT series sensors ---->
8+
https://www.adafruit.com/products/385
79

8-
Currently the library is tested with Python 2.6, 2.7, 3.3 and 3.4. It should work with Python greater than 3.4, too.
10+
Currently the library is tested with Python 2.6, 2.7, 3.3 and 3.4. It should
11+
work with Python greater than 3.4, too.
912

1013
Installing
1114
----------
1215

13-
For all platforms (Raspberry Pi and Beaglebone Black) make sure your system is able to compile Python extensions. On Raspbian or Beaglebone Black's Debian/Ubuntu image you can ensure your system is ready by executing:
16+
### Dependencies
1417

18+
For all platforms (Raspberry Pi and Beaglebone Black) make sure your system is
19+
able to compile and download Python extensions with **pip**:
20+
21+
On Raspbian or Beaglebone Black's Debian/Ubuntu image you can ensure your
22+
system is ready by running one or two of the following sets of commands:
23+
24+
Python 2:
25+
26+
````sh
27+
sudo apt-get update
28+
sudo apt-get install python-pip
29+
sudo python -m pip install --upgrade pip setuptools wheel
1530
````
31+
32+
Python 3:
33+
34+
````sh
1635
sudo apt-get update
17-
sudo apt-get install build-essential python-dev python3-dev
36+
sudo apt-get install python3-pip
37+
sudo python3 -m pip install --upgrade pip setuptools wheel
1838
````
1939

20-
Next, use `pip` to install from PyPI. For Python2:
40+
### Install with pip
41+
42+
Use `pip` to install from PyPI.
43+
44+
Python 2:
2145

2246
```sh
23-
sudo python -m pip install --upgrade pip setuptools wheel
2447
sudo pip install Adafruit_DHT
2548
```
2649

27-
Or for Python 3:
50+
Python 3:
2851

2952
```sh
30-
sudo python3 -m pip install --upgrade pip setuptools wheel
3153
sudo pip3 install Adafruit_DHT
3254
```
3355

34-
Alternatively, you can install from this repository.
56+
### Compile and install from the repository
3557

36-
For Python 2, install the library by downloading from the [GitHub releases
37-
page](https://github.com/adafruit/Adafruit_Python_DHT/releases),
38-
unzipping the archive, and executing:
58+
First download the library source code from the [GitHub releases
59+
page](https://github.com/adafruit/Adafruit_Python_DHT/releases), unzipping the
60+
archive, and execute:
61+
62+
Python 2:
3963

4064
```sh
41-
sudo python -m pip install --upgrade pip setuptools wheel
4265
cd Adafruit_Python_DHT
4366
sudo python setup.py install
4467
```
4568

46-
For Python 3, download and extract the library and execute:
69+
Python 3:
4770

4871
```sh
49-
sudo python3 -m pip3 install --upgrade pip setuptools wheel
5072
cd Adafruit_Python_DHT
5173
sudo python3 setup.py install
5274
```
5375

76+
You may also git clone the repository if you want to test an unreleased
77+
version:
78+
79+
```sh
80+
git clone https://github.com/adafruit/Adafruit_Python_DHT.git
81+
```
82+
5483
Usage
5584
-----
5685

@@ -59,7 +88,8 @@ See example of usage in the examples folder.
5988
Author
6089
------
6190

62-
Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!
91+
Adafruit invests time and resources providing this open source code, please
92+
support Adafruit and open-source hardware by purchasing products from Adafruit!
6393

6494
Written by Tony DiCola for Adafruit Industries.
6595

0 commit comments

Comments
 (0)
0