make setup.py pre-requisites instructions consistent

This commit is contained in:
Matthew Wall
2020-02-28 15:01:04 -05:00
parent c71011c75f
commit cd6d11c1ef

View File

@@ -112,21 +112,21 @@ Python 2.7.15rc1
</button>
<div id="prereq-debian-py2" class="tab-content">
<pre class="tty"># For systems that do not have Python 2 pre-installed (for example,
# Ubuntu 18.04 and later):
<pre class="tty">
<span class='cmd'>sudo apt-get update</span>
# For systems that do not have Python2 pre-installed
# (for example, Ubuntu 18.04 and later):
<span class='cmd'>sudo apt-get install python</span>
# You may have to install the Python Imaging Library.
# Try this first:
<span class='cmd'>sudo apt-get install python-pil</span>
# If that doesn't work, try this:
# Required packages:
<span class="cmd">sudo apt-get install python-configobj
sudo apt-get install python-cheetah
sudo apt-get install python-pil</span>
# If python-pil does not work, try this:
<span class='cmd'>sudo apt-get install python-imaging</span>
# Other required packages:
<span class="cmd">sudo apt-get install python-configobj
sudo apt-get install python-cheetah</span>
# Required if hardware is serial or USB, respectively:
# Required if hardware is serial or USB:
<span class="cmd">sudo apt-get install python-serial
sudo apt-get install python-usb</span>
@@ -137,28 +137,30 @@ sudo apt-get install python-mysqldb</span>
# Required if using FTP on Raspbian systems:
<span class="cmd">sudo apt-get install ftp</span>
# Optional. For extended almanac information, install "ephem".
# Try this first:
# Optional: for extended almanac information:
<span class="cmd">sudo apt-get install python-ephem</span>
# If that doesn't work, try this:
# If that does not work, try this:
<span class="cmd">sudo apt-get install python-dev
sudo apt-get install python-pip
sudo pip install pyephem</span></pre>
</div>
<div id="prereq-debian-py3" class="tab-content">
<pre class="tty"># Required packages:
<pre class="tty">
<span class='cmd'>sudo apt-get update</span>
# Required packages:
<span class="cmd">sudo apt-get install python3-pil
sudo apt-get install python3-configobj
sudo apt-get install python3-distutils</span>
# Not all distributions have ported Cheetah to Python 3. Try this first:
<span class="cmd">sudo apt-get install python3-cheetah</span>
# If that doesn't work, try this:
sudo apt-get install python3-distutils
sudo apt-get install python3-cheetah</span>
# If python3-cheetah does not work, try this:
<span class="cmd">sudo apt-get install python3-cheetah3</span>
# If python3-cheetah3 does not work, try this:
<span class="cmd">sudo apt-get install python3-pip
sudo apt-get install python3-dev
sudo pip3 install cheetah3</span>
# Required if hardware is serial or USB, respectively:
# Required if hardware is serial or USB:
<span class="cmd">sudo apt-get install python3-serial
sudo apt-get install python3-usb</span>
@@ -166,14 +168,12 @@ sudo apt-get install python3-usb</span>
<span class="cmd">sudo apt-get install mysql-client
sudo apt-get install python3-mysqldb</span>
# Optional. For extended almanac information, install "ephem".
# Not all distributions have ported it to Python 3. Try this first:
# Optional: for extended almanac information:
<span class="cmd">sudo apt-get install python3-ephem</span>
# If that doesn't work, try this:
# If that does not work, try this:
<span class="cmd">sudo apt-get install python3-pip
sudo apt-get install python3-dev
sudo pip3 install pyephem</span>
</pre>
sudo pip3 install pyephem</span></pre>
</div>
</div>
@@ -186,7 +186,10 @@ sudo pip3 install pyephem</span>
</button>
<div id="prereq-redhat-py2" class="tab-content">
<pre class='tty'># Required packages:
<pre class='tty'># For systems based on RHEL 7 and earlier:
<span class="cmd">sudo yum update</span>
# Required packages:
<span class="cmd">sudo yum install python-configobj
sudo yum install python-cheetah
sudo yum install python-imaging</span>
@@ -200,32 +203,30 @@ sudo easy_install pyusb</span>
<span class="cmd">sudo yum install mysql-client
sudo yum install python-mysqldb</span>
# Optional for extended almanac information:
<span class="cmd">sudo yum install pyephem</span>
</pre>
# Optional: for extended almanac information:
<span class="cmd">sudo yum install pyephem</span></pre>
</div>
<div id="prereq-redhat-py3" class="tab-content">
<pre class="tty"># For RHEL 8 based systems.
<pre class="tty"># For systems based on RHEL 8 and later:
<span class="cmd">sudo yum update</span>
# You may have to install Python 3:
<span class="cmd">sudo yum update
sudo yum install python3</span>
# Ensure that Python3 is installed:
<span class="cmd">sudo yum install python3</span>
# Then install pre-requisites:
# Required packages:
<span class="cmd">sudo yum install python3-configobj
sudo yum install python3-pillow
sudo yum install python3-pyserial
sudo pip3 install Cheetah3</span>
# Required if hardware is serial or USB:
<span class="cmd">sudo yum install python3-pyserial
sudo yum install python3-pyusb</span>
# As of this writing, Cheetah can only be installed using pip3:
<span class="cmd">sudo pip3 install Cheetah3</span>
# For extended almanac information (optional)
<span class="cmd">sudo pip3 install pyephem</span>
# If you plan on using MySQL
# Required if using MySQL:
<span class="cmd">sudo yum install python3-PyMySQL</span>
</pre>
# Optional: for extended almanac information
<span class="cmd">sudo pip3 install pyephem</span></pre>
</div>
</div>
@@ -239,23 +240,23 @@ sudo yum install python3-pyusb</span>
<div id="prereq-suse-py2" class="tab-content">
<pre class='tty'># Tested on openSUSE Leap 15.1
# You may have to install python 2 first:
# Ensure that Python2 is installed:
<span class="cmd">sudo zypper install python</span>
# Required packages:
<span class="cmd">sudo zypper install python2-configobj
sudo zypper install python2-Pillow
sudo zypper install python2-pyserial
sudo zypper install python2-usb</span>
# Cheetah must be installed by using pip2:
<span class="cmd">sudo zypper install python2-pip
sudo zypper install python2-pip
sudo pip2 install Cheetah</span>
# If you plan on using MySQL / MariaDB:
# Required if hardware is serial or USB:
<span class="cmd">sudo zypper install python2-pyserial
sudo zypper install python2-usb<span>
# Required if using MySQL / MariaDB:
<span class="cmd">sudo zypper install python2-mysqlclient</span>
# For extended almanac information (optional):
# Optional: for extended almanac information:
<span class="cmd">sudo pip2 install pyephem</span></pre>
</div>
<div id="prereq-suse-py3" class="tab-content">
@@ -268,10 +269,10 @@ sudo zypper install python3-Cheetah3
sudo zypper install python3-pyserial
sudo zypper install python3-usb</span>
# If you plan on using MySQL / MariaDB:
# Required if using MySQL / MariaDB:
<span class="cmd">sudo zypper install python3-mysqlclient</span>
# For extended almanac information (optional)
# Optional: for extended almanac information:
<span class="cmd">sudo pip3 install pyephem</span></pre>
</div>
</div>
@@ -285,39 +286,37 @@ sudo zypper install python3-usb</span>
</button>
<div id="prereq-pip-py2" class="tab-content">
<pre class='tty'><span class="cmd">sudo pip install configobj
<pre class='tty'># Required packages:
<span class="cmd">sudo pip install configobj
sudo pip install cheetah
sudo pip install pillow
sudo pip install MySQL-python</span>
sudo pip install pillow</span>
# Required if hardware is serial or USB, respectively:
# Required if hardware is serial or USB:
<span class="cmd">sudo pip install pyserial
sudo pip install pyusb</span>
# Optional for extended almanac information:
<span class="cmd">sudo pip install pyephem</span>
</pre>
# Required if using MySQL:
<span class="cmd">sudo pip install MySQL-python</span>
# Optional: for extended almanac information:
<span class="cmd">sudo pip install pyephem</span></pre>
</div>
<div id="prereq-pip-py3" class="tab-content">
<pre class="tty"># Install pip3 if it has not already been installed:
<span class="cmd">sudo apt-get install python3-pip</span>
# Then the prerequisites:
<pre class="tty"># Required packages:
<span class="cmd">sudo pip3 install configobj
sudo pip3 install cheetah3
sudo pip3 install Pillow-PIL</span>
# Required if you are planning on using MySQL. If this does not
# install cleanly, then see <a href="https://pypi.org/project/mysqlclient/">https://pypi.org/project/mysqlclient/</a>
<span class="cmd">sudo pip3 install mysqlclient</span>
# Required if hardware is serial or USB, respectively:
<span class="cmd">sudo pip3 install pyserial
sudo pip3 install pyusb</span>
# Optional for extended almanac information:
<span class="cmd">sudo pip3 install pyephem</span>
</pre>
# Required if using MySQL. If this does not
# install cleanly, then see <a href="https://pypi.org/project/mysqlclient/">https://pypi.org/project/mysqlclient/</a>
<span class="cmd">sudo pip3 install mysqlclient</span>
# Optional: for extended almanac information:
<span class="cmd">sudo pip3 install pyephem</span></pre>
</div>
</div>
</div>
@@ -338,23 +337,9 @@ sudo pip3 install pyusb</span>
sudo python3 ./setup.py install</pre>
<p>
This example uses <span class="code">python3</span> to install WeeWX.
This example uses Python3 to install WeeWX. For Python2 use <span class="code">python2</span> or <span class="code">python</span>.
</p>
<p class="note">Note that whatever version of Python you use to invoke
<span class="code">setup.py</span> will be injected into the "shebang" at the top of all
executables, making it the default Python used to run the executable.
</p>
<p>
For example, after the above, the top of the executable <span class="code">weewxd</span>,
will look like:
</p>
<pre class="tty">#!/usr/bin/python3
#
# Copyright (c) 2009-2019 Tom Keffer <tkeffer@gmail.com>
...
</pre>
<h2>Run</h2>
<p>Run the main program directly:</p>