mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 09:40:36 +00:00
Complete PC/Mac installation instructions and move to remote gpio setup page
This commit is contained in:
@@ -27,80 +27,31 @@ or Python 2:
|
||||
|
||||
pi@raspberrypi:~$ sudo apt install python-gpiozero
|
||||
|
||||
Linux
|
||||
=====
|
||||
|
||||
First, update your distribution's repositories list. For example:
|
||||
If you're using another operating system on your Raspberry Pi, you may need to
|
||||
use pip to install GPIO Zero instead. Install pip using `get-pip`_ and then
|
||||
type:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo apt update
|
||||
pi@raspberrypi:~$ sudo pip3 install gpiozero
|
||||
|
||||
Then install pip for Python 3:
|
||||
or for Python 2:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo apt install python3-pip
|
||||
pi@raspberrypi:~$ sudo pip install gpiozero
|
||||
|
||||
or Python 3:
|
||||
To install GPIO Zero in a virtual environment, see the :doc:`development` page.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo apt install python-pip
|
||||
|
||||
(Alternatively, install pip with `get-pip`_.)
|
||||
|
||||
Next, install gpiozero for Python 3:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo pip3 install gpiozero
|
||||
|
||||
or Python 2:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo pip install gpiozero
|
||||
|
||||
.. note::
|
||||
|
||||
We welcome Linux distribution maintainers to include the gpiozero packages
|
||||
in their repositories. Any questions you have, please ask questions on
|
||||
`GitHub`_ and we'll be happy to help.
|
||||
|
||||
Mac OS
|
||||
PC/Mac
|
||||
======
|
||||
|
||||
First, install pip:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ ???
|
||||
|
||||
Next, install gpiozero with pip:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ pip install gpiozero
|
||||
|
||||
Windows
|
||||
=======
|
||||
|
||||
First, install pip:
|
||||
|
||||
.. code-block:: doscon
|
||||
|
||||
C:\Users\user1> ???
|
||||
|
||||
Next, install gpiozero with pip:
|
||||
|
||||
.. code-block:: doscon
|
||||
|
||||
C:\Users\user1> pip install gpiozero
|
||||
In order to use GPIO Zero's remote GPIO feature from a PC or Mac, you'll need
|
||||
to install GPIO Zero on that computer using pip. See the :doc:`remote_gpio`
|
||||
page for more information.
|
||||
|
||||
|
||||
.. _Raspbian Jessie: https://www.raspberrypi.org/downloads/raspbian/
|
||||
.. _PIXEL x86: https://www.raspberrypi.org/blog/pixel-pc-mac/
|
||||
.. _raspberrypi.org: https://www.raspberrypi.org/downloads/
|
||||
.. _get-pip: https://pip.pypa.io/en/stable/installing/
|
||||
.. _GitHub: https://github.com/RPi-Distro/python-gpiozero/issues
|
||||
|
||||
@@ -21,8 +21,8 @@ used.
|
||||
Preparing the Raspberry Pi
|
||||
==========================
|
||||
|
||||
If you're using Raspbian Jessie (desktop - not Jessie Lite) then you have
|
||||
everything you need to use the remote GPIO feature. If you're using Jessie
|
||||
If you're using Raspbian Jessie (desktop - not Raspbian Lite) then you have
|
||||
everything you need to use the remote GPIO feature. If you're using Raspbian
|
||||
Lite, or another distribution, you'll need to install pigpio:
|
||||
|
||||
.. code-block:: console
|
||||
@@ -75,29 +75,29 @@ First, update your repositories list:
|
||||
|
||||
$ sudo apt update
|
||||
|
||||
Then install the pigpio library for Python 3:
|
||||
Then install GPIO Zero and the pigpio library for Python 3:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo apt install python3-pigpio
|
||||
$ sudo apt install python3-gpiozero python3-pigpio
|
||||
|
||||
or Python 2:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo apt install python-pigpio
|
||||
$ sudo apt install python-gpiozero python-pigpio
|
||||
|
||||
Alternatively, install with pip:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo pip3 install pigpio
|
||||
$ sudo pip3 install gpiozero pigpio
|
||||
|
||||
or:
|
||||
or for Python 2:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo pip install pigpio
|
||||
$ sudo pip install gpiozero pigpio
|
||||
|
||||
Linux
|
||||
-----
|
||||
@@ -122,47 +122,45 @@ or Python 2:
|
||||
|
||||
(Alternatively, install pip with `get-pip`_.)
|
||||
|
||||
Next, install pigpio for Python 3:
|
||||
Next, install GPIO Zero and pigpio for Python 3:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo pip3 install pigpio
|
||||
$ sudo pip3 install gpiozero pigpio
|
||||
|
||||
or Python 2:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo pip install pigpio
|
||||
$ sudo pip install gpiozero pigpio
|
||||
|
||||
Mac OS
|
||||
------
|
||||
|
||||
First, install pip:
|
||||
First, install pip. If you installed Python 3 using brew, you will already have
|
||||
pip. If not, install pip with `get-pip`_.
|
||||
|
||||
Next, install GPIO Zero and pigpio with pip:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ ???
|
||||
$ pip3 install gpiozero pigpio
|
||||
|
||||
Next, install pigpio with pip:
|
||||
Or for Python 2:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ pip install pigpio
|
||||
$ pip install gpiozero pigpio
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
First install pip:
|
||||
First, install pip by `following this guide`_. Next, install GPIO Zero and
|
||||
pigpio with pip:
|
||||
|
||||
.. code-block:: doscon
|
||||
|
||||
C:\Users\user1> ???
|
||||
|
||||
Next, install pigpio with pip:
|
||||
|
||||
.. code-block:: doscon
|
||||
|
||||
C:\Users\user1> pip install pigpio
|
||||
C:\Users\user1> pip install gpiozero pigpio
|
||||
|
||||
Environment variables
|
||||
=====================
|
||||
@@ -312,6 +310,7 @@ from the computer, referencing the host by its hostname, like so:
|
||||
.. _RPi.GPIO: https://pypi.python.org/pypi/RPi.GPIO
|
||||
.. _pigpio: http://abyz.co.uk/rpi/pigpio/python.html
|
||||
.. _get-pip: https://pip.pypa.io/en/stable/installing/
|
||||
.. _following this guide: https://www.raspberrypi.org/learning/using-pip-on-windows/worksheet/
|
||||
.. _Sense HAT: https://www.raspberrypi.org/products/sense-hat/
|
||||
.. _Raspberry Pi Zero: https://www.raspberrypi.org/products/pi-zero/
|
||||
.. _Pi Zero W: https://www.raspberrypi.org/products/pi-zero-w/
|
||||
|
||||
Reference in New Issue
Block a user