From 688c421c55d7c773975e82b519c2ce9a8a28f78d Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 18 Jul 2018 17:40:08 -0400 Subject: [PATCH] Tweaked Python3 guide to be less disruptive --- docs/installation/migrating-to-python3.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/installation/migrating-to-python3.md b/docs/installation/migrating-to-python3.md index d66544e12..b2efadea1 100644 --- a/docs/installation/migrating-to-python3.md +++ b/docs/installation/migrating-to-python3.md @@ -3,34 +3,36 @@ !!! 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 +## Ubuntu + +Remove the Python2 version of gunicorn: ```no-highlight -# apt-get remove --purge -y python-dev python-pip +# pip uninstall -y gunicorn ``` -Install Python 3 packages +Install Python3 and pip3, Python's package management tool: ```no-highlight -# apt-get install -y python3 python3-dev python3-pip +# apt-get update +# apt-get install -y python3 python3-dev python3-setuptools +# easy_install3 pip ``` -Install Python Packages +Install the Python3 packages required by NetBox: ```no-highlight -# cd /opt/netbox # pip3 install -r requirements.txt ``` -Gunicorn Update +Replace gunicorn with the Python3 version: ```no-highlight -# pip uninstall gunicorn # pip3 install gunicorn ``` -Re-install LDAP Module (optional if using LDAP for auth) +If using LDAP authentication, install the `django-auth-ldap` package: ```no-highlight -sudo pip3 install django-auth-ldap +# pip3 install django-auth-ldap ```