Skip to content
This repository was archived by the owner on Nov 12, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 41 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,58 @@ Designed specifically to work with the Adafruit DHT series sensors ----> https:/

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.

Installing
----------

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:

````
sudo apt-get update
sudo apt-get install build-essential python-dev
sudo apt-get install build-essential python-dev python3-dev
Copy link

@juliogonzalez juliogonzalez Jul 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The instructions are missing python-pip/python3-pip (at least in my Raspbian python-dev/python3-dev does not have it as dependency).

However installing python-pip or python3-pip takes care of installing build-essentials, python-dev/python3-dev and all the rest of the stuff.

As the instructions are for microcomputers, I think it's best to save as much space as possible. And in the end, the less software the user has installed, smaller the risk of having vulnerabilities, so IMHO it's best to fully separate python2 and python3 instructions.

On the other hand, I am not really sure sudo python -m pip install --upgrade pip setuptools wheel is needed for everyone. At my raspbian it's not required to install using pip (but I am not removing from the proposal anyway).

So my proposal would be:

Installing

Dependencies

For all platforms (Raspberry Pi and Beaglebone Black) make sure your system is able to compile and download Python extensions with pip:

On Raspbian or Beaglebone Black's Debian/Ubuntu image you can ensure your system is ready by running one or two of the following sets of commands:

Python2:

sudo apt-get update
sudo apt-get install python-pip
sudo python -m pip install --upgrade pip setuptools wheel

Python3:

sudo apt-get update
sudo apt-get install python3-pip
sudo python3 -m pip install --upgrade pip setuptools wheel

Install with pip

Use pip to install from PyPI.

Python2:

sudo pip install Adafruit_DHT

Python3:

sudo pip3 install Adafruit_DHT

Compile and install from the repository

First download the library source code from the GitHub releases page, unzipping the archive, and execute:

Python2:

cd Adafruit_Python_DHT
sudo python setup.py install

Python3:

cd Adafruit_Python_DHT
sudo python3 setup.py install

You could also git clone the repository if you want to test an unreleased version.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the instructions above, and everything seems to be working fine on Raspbian, even compiling locally from the remove_ez_setup branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quality feedback. I'll tweak instructions a bit and merge.

````

Install the library by downloading with the download link on the right, unzipping the archive, and executing:
Next, use `pip` to install from PyPI. For Python2:

````
```sh
sudo python -m pip install --upgrade pip setuptools wheel
sudo pip install Adafruit_DHT
```

Or for Python 3:

```sh
sudo python3 -m pip install --upgrade pip setuptools wheel
sudo pip3 install Adafruit_DHT
```

Alternatively, you can install from this repository.

For Python 2, install the library by downloading from the [GitHub releases
page](https://github.com/adafruit/Adafruit_Python_DHT/releases),
unzipping the archive, and executing:

```sh
sudo python -m pip install --upgrade pip setuptools wheel
cd Adafruit_Python_DHT
sudo python setup.py install
````
You can ommit the sudo if you use raspberry pi.
```

For Python 3, download and extract the library and execute:

```sh
sudo python3 -m pip3 install --upgrade pip setuptools wheel
cd Adafruit_Python_DHT
sudo python3 setup.py install
```

Usage
-----

See example of usage in the examples folder.

Author
------

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

Written by Tony DiCola for Adafruit Industries.
Expand Down
332 changes: 0 additions & 332 deletions ez_setup.py

This file was deleted.

Loading