diff --git a/README.md b/README.md index 9fa3acb94..28673bf36 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ or join us in the #netbox Slack channel on [NetworkToCode](https://networktocode ### Build Status -NetBox is built against both Python 2.7 and 3.5. Python 3.5 is recommended. +NetBox is built against both Python 2.7 and 3.5. Python 3.5 or higher is strongly recommended. | | status | |-------------|------------| diff --git a/docs/installation/ldap.md b/docs/installation/ldap.md index d8053da48..8eb4acc4d 100644 --- a/docs/installation/ldap.md +++ b/docs/installation/ldap.md @@ -7,13 +7,13 @@ This guide explains how to implement LDAP authentication using an external serve On Ubuntu: ```no-highlight -sudo apt-get install -y python-dev libldap2-dev libsasl2-dev libssl-dev +sudo apt-get install -y libldap2-dev libsasl2-dev libssl-dev ``` On CentOS: ```no-highlight -sudo yum install -y python-devel openldap-devel +sudo yum install -y openldap-devel ``` ## Install django-auth-ldap diff --git a/docs/installation/migrating-to-python3.md b/docs/installation/migrating-to-python3.md index e99018252..d66544e12 100644 --- a/docs/installation/migrating-to-python3.md +++ b/docs/installation/migrating-to-python3.md @@ -1,5 +1,8 @@ # Migration +!!! warning + Beginning with v2.5, NetBox will no longer support Python 2. It is strongly recommended that you upgrade to Python 3 as soon as possible. + Remove Python 2 packages ```no-highlight diff --git a/docs/installation/netbox.md b/docs/installation/netbox.md index e7daba3cd..5577b389b 100644 --- a/docs/installation/netbox.md +++ b/docs/installation/netbox.md @@ -2,43 +2,21 @@ This section of the documentation discusses installing and configuring the NetBox application. -!!! note - Python 3 is strongly encouraged for new installations. Support for Python 2 will be discontinued in the near future. This documentation includes a guide on [migrating from Python 2 to Python 3](migrating-to-python3). - **Ubuntu** -Python 3: - ```no-highlight # apt-get install -y python3 python3-dev python3-setuptools build-essential libxml2-dev libxslt1-dev libffi-dev graphviz libpq-dev libssl-dev zlib1g-dev # easy_install3 pip ``` -Python 2: - -```no-highlight -# apt-get install -y python2.7 python-dev python-setuptools build-essential libxml2-dev libxslt1-dev libffi-dev graphviz libpq-dev libssl-dev zlib1g-dev -# easy_install pip -``` - **CentOS** -Python 3: - ```no-highlight # yum install -y epel-release # yum install -y gcc python34 python34-devel python34-setuptools libxml2-devel libxslt-devel libffi-devel graphviz openssl-devel redhat-rpm-config # easy_install-3.4 pip ``` -Python 2: - -```no-highlight -# yum install -y epel-release -# yum install -y gcc python2 python-devel python-setuptools libxml2-devel libxslt-devel libffi-devel graphviz openssl-devel redhat-rpm-config -# easy_install pip -``` - You may opt to install NetBox either from a numbered release or by cloning the master branch of its repository on GitHub. ## Option A: Download a Release @@ -97,24 +75,16 @@ Checking connectivity... done. Install the required Python packages using pip. (If you encounter any compilation errors during this step, ensure that you've installed all of the system dependencies listed above.) -Python 3: - ```no-highlight # pip3 install -r requirements.txt ``` -Python 2: - -```no-highlight -# pip install -r requirements.txt -``` - !!! note - If you encounter errors while installing the required packages, check that you're running a recent version of pip (v9.0.1 or higher) with the command `pip -V` or `pip3 -V`. + If you encounter errors while installing the required packages, check that you're running a recent version of pip (v9.0.1 or higher) with the command `pip3 -V`. ### NAPALM Automation -As of v2.1.0, NetBox supports integration with the [NAPALM automation](https://napalm-automation.net/) library. NAPALM allows NetBox to fetch live data from devices and return it to a requester via its REST API. Installation of NAPALM is optional. To enable it, install the `napalm` package using pip or pip3: +NetBox supports integration with the [NAPALM automation](https://napalm-automation.net/) library. NAPALM allows NetBox to fetch live data from devices and return it to a requester via its REST API. Installation of NAPALM is optional. To enable it, install the `napalm` package using pip or pip3: ```no-highlight # pip3 install napalm @@ -172,9 +142,6 @@ You may use the script located at `netbox/generate_secret_key.py` to generate a # Run Database Migrations -!!! warning - The examples on the rest of this page call the `python3` executable. Replace this with `python2` or `python` if you're using Python 2. - Before NetBox can run, we need to install the database schema. This is done by running `python3 manage.py migrate` from the `netbox` directory (`/opt/netbox/netbox/` in our example): ```no-highlight diff --git a/docs/installation/upgrading.md b/docs/installation/upgrading.md index b2700596e..a8924e1df 100644 --- a/docs/installation/upgrading.md +++ b/docs/installation/upgrading.md @@ -65,7 +65,7 @@ Once the new code is in place, run the upgrade script (which may need to be run ``` !!! warning - The upgrade script will prefer Python3 and pip3 if both executables are available. To force it to use Python2 and pip, use the `-2` argument as below. + The upgrade script will prefer Python3 and pip3 if both executables are available. To force it to use Python2 and pip, use the `-2` argument as below. Note that Python 2 will no longer be supported in NetBox v2.5. ```no-highlight # ./upgrade.sh -2 diff --git a/docs/installation/web-server.md b/docs/installation/web-server.md index 39235200b..5886e3323 100644 --- a/docs/installation/web-server.md +++ b/docs/installation/web-server.md @@ -102,7 +102,7 @@ To enable SSL, consider this guide on [securing Apache with Let's Encrypt](https # gunicorn Installation -Install gunicorn using `pip3` (Python 3) or `pip` (Python 2): +Install gunicorn: ```no-highlight # pip3 install gunicorn