mirror of
				https://github.com/KevinMidboe/python-gpiozero.git
				synced 2025-10-29 17:50:37 +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 |     pi@raspberrypi:~$ sudo apt install python-gpiozero | ||||||
|  |  | ||||||
| Linux | 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: | ||||||
| First, update your distribution's repositories list. For example: |  | ||||||
|  |  | ||||||
| .. code-block:: console | .. 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 | .. 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 | PC/Mac | ||||||
|  |  | ||||||
|     $ 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 |  | ||||||
| ====== | ====== | ||||||
|  |  | ||||||
| First, install pip: | 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` | ||||||
| .. code-block:: console | page for more information. | ||||||
|  |  | ||||||
|     $ ??? |  | ||||||
|  |  | ||||||
| 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 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| .. _Raspbian Jessie: https://www.raspberrypi.org/downloads/raspbian/ | .. _Raspbian Jessie: https://www.raspberrypi.org/downloads/raspbian/ | ||||||
| .. _PIXEL x86: https://www.raspberrypi.org/blog/pixel-pc-mac/ | .. _PIXEL x86: https://www.raspberrypi.org/blog/pixel-pc-mac/ | ||||||
| .. _raspberrypi.org: https://www.raspberrypi.org/downloads/ | .. _raspberrypi.org: https://www.raspberrypi.org/downloads/ | ||||||
| .. _get-pip: https://pip.pypa.io/en/stable/installing/ | .. _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 | Preparing the Raspberry Pi | ||||||
| ========================== | ========================== | ||||||
|  |  | ||||||
| If you're using Raspbian Jessie (desktop - not Jessie Lite) then you have | 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 Jessie | everything you need to use the remote GPIO feature. If you're using Raspbian | ||||||
| Lite, or another distribution, you'll need to install pigpio: | Lite, or another distribution, you'll need to install pigpio: | ||||||
|  |  | ||||||
| .. code-block:: console | .. code-block:: console | ||||||
| @@ -75,29 +75,29 @@ First, update your repositories list: | |||||||
|  |  | ||||||
|     $ sudo apt update |     $ 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 | .. code-block:: console | ||||||
|  |  | ||||||
|     $ sudo apt install python3-pigpio |     $ sudo apt install python3-gpiozero python3-pigpio | ||||||
|  |  | ||||||
| or Python 2: | or Python 2: | ||||||
|  |  | ||||||
| .. code-block:: console | .. code-block:: console | ||||||
|  |  | ||||||
|     $ sudo apt install python-pigpio |     $ sudo apt install python-gpiozero python-pigpio | ||||||
|  |  | ||||||
| Alternatively, install with pip: | Alternatively, install with pip: | ||||||
|  |  | ||||||
| .. code-block:: console | .. code-block:: console | ||||||
|  |  | ||||||
|     $ sudo pip3 install pigpio |     $ sudo pip3 install gpiozero pigpio | ||||||
|  |  | ||||||
| or: | or for Python 2: | ||||||
|  |  | ||||||
| .. code-block:: console | .. code-block:: console | ||||||
|  |  | ||||||
|     $ sudo pip install pigpio |     $ sudo pip install gpiozero pigpio | ||||||
|  |  | ||||||
| Linux | Linux | ||||||
| ----- | ----- | ||||||
| @@ -122,47 +122,45 @@ or Python 2: | |||||||
|  |  | ||||||
| (Alternatively, install pip with `get-pip`_.) | (Alternatively, install pip with `get-pip`_.) | ||||||
|  |  | ||||||
| Next, install pigpio for Python 3: | Next, install GPIO Zero and pigpio for Python 3: | ||||||
|  |  | ||||||
| .. code-block:: console | .. code-block:: console | ||||||
|  |  | ||||||
|     $ sudo pip3 install pigpio |     $ sudo pip3 install gpiozero pigpio | ||||||
|  |  | ||||||
| or Python 2: | or Python 2: | ||||||
|  |  | ||||||
| .. code-block:: console | .. code-block:: console | ||||||
|  |  | ||||||
|     $ sudo pip install pigpio |     $ sudo pip install gpiozero pigpio | ||||||
|  |  | ||||||
| Mac OS | 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 | .. code-block:: console | ||||||
|  |  | ||||||
|     $ ??? |     $ pip3 install gpiozero pigpio | ||||||
|  |  | ||||||
| Next, install pigpio with pip: | Or for Python 2: | ||||||
|  |  | ||||||
| .. code-block:: console | .. code-block:: console | ||||||
|  |  | ||||||
|     $ pip install pigpio |     $ pip install gpiozero pigpio | ||||||
|  |  | ||||||
| Windows | Windows | ||||||
| ------- | ------- | ||||||
|  |  | ||||||
| First install pip: | First, install pip by `following this guide`_. Next, install GPIO Zero and | ||||||
|  | pigpio with pip: | ||||||
|  |  | ||||||
| .. code-block:: doscon | .. code-block:: doscon | ||||||
|  |  | ||||||
|     C:\Users\user1> ??? |     C:\Users\user1> pip install gpiozero pigpio | ||||||
|  |  | ||||||
| Next, install pigpio with pip: |  | ||||||
|  |  | ||||||
| .. code-block:: doscon |  | ||||||
|  |  | ||||||
|     C:\Users\user1> pip install pigpio |  | ||||||
|  |  | ||||||
| Environment variables | 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 | .. _RPi.GPIO: https://pypi.python.org/pypi/RPi.GPIO | ||||||
| .. _pigpio: http://abyz.co.uk/rpi/pigpio/python.html | .. _pigpio: http://abyz.co.uk/rpi/pigpio/python.html | ||||||
| .. _get-pip: https://pip.pypa.io/en/stable/installing/ | .. _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/ | .. _Sense HAT: https://www.raspberrypi.org/products/sense-hat/ | ||||||
| .. _Raspberry Pi Zero: https://www.raspberrypi.org/products/pi-zero/ | .. _Raspberry Pi Zero: https://www.raspberrypi.org/products/pi-zero/ | ||||||
| .. _Pi Zero W: https://www.raspberrypi.org/products/pi-zero-w/ | .. _Pi Zero W: https://www.raspberrypi.org/products/pi-zero-w/ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user