Skip to content

Commit 18846de

Browse files
authored
Merge pull request adafruit#101 from adafruit/remove_ez_setup
remove deprecated ez_setup.py; update install instructions (fixes adafruit#91)
2 parents b1d428f + f66c1ca commit 18846de

File tree

3 files changed

+77
-351
lines changed

3 files changed

+77
-351
lines changed

README.md

Lines changed: 76 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,95 @@
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

10-
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:
13+
Installing
14+
----------
1115

12-
````
16+
### Dependencies
17+
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
1327
sudo apt-get update
14-
sudo apt-get install build-essential python-dev
28+
sudo apt-get install python-pip
29+
sudo python -m pip install --upgrade pip setuptools wheel
1530
````
1631

17-
Install the library by downloading with the download link on the right, unzipping the archive, and executing:
32+
Python 3:
1833

34+
````sh
35+
sudo apt-get update
36+
sudo apt-get install python3-pip
37+
sudo python3 -m pip install --upgrade pip setuptools wheel
1938
````
39+
40+
### Install with pip
41+
42+
Use `pip` to install from PyPI.
43+
44+
Python 2:
45+
46+
```sh
47+
sudo pip install Adafruit_DHT
48+
```
49+
50+
Python 3:
51+
52+
```sh
53+
sudo pip3 install Adafruit_DHT
54+
```
55+
56+
### Compile and install from the repository
57+
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:
63+
64+
```sh
65+
cd Adafruit_Python_DHT
2066
sudo python setup.py install
21-
````
22-
You can ommit the sudo if you use raspberry pi.
67+
```
68+
69+
Python 3:
70+
71+
```sh
72+
cd Adafruit_Python_DHT
73+
sudo python3 setup.py install
74+
```
75+
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+
83+
Usage
84+
-----
2385

2486
See example of usage in the examples folder.
2587

26-
Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!
88+
Author
89+
------
90+
91+
Adafruit invests time and resources providing this open source code, please
92+
support Adafruit and open-source hardware by purchasing products from Adafruit!
2793

2894
Written by Tony DiCola for Adafruit Industries.
2995

0 commit comments

Comments
 (0)