Skipping local dependencies (local_requirements.txt not found)
Applying database migrations (python3 netbox/manage.py migrate)...
Traceback (most recent call last):
File "netbox/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/opt/netbox-2.8.5/venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/opt/netbox-2.8.5/venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 345, in execute
settings.INSTALLED_APPS
File "/opt/netbox-2.8.5/venv/lib/python3.5/site-packages/django/conf/__init__.py", line 76, in __getattr__
self._setup(name)
File "/opt/netbox-2.8.5/venv/lib/python3.5/site-packages/django/conf/__init__.py", line 63, in _setup
self._wrapped = Settings(settings_module)
File "/opt/netbox-2.8.5/venv/lib/python3.5/site-packages/django/conf/__init__.py", line 142, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 665, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/opt/netbox-2.8.5/netbox/netbox/settings.py", line 30, in <module>
"NetBox requires Python 3.6 or higher (current: Python {})".format(platform.python_version())
RuntimeError: NetBox requires Python 3.6 or higher (current: Python 3.5.2)####:/opt/netbox-2.8.5/venv/lib$ ll
total 12
drwxr-xr-x 3 root root 4096 May 29 14:26 ./
drwxr-xr-x 6 root root 4096 May 29 14:26 ../
drwxr-xr-x 3 root root 4096 May 29 14:26 python3.5/Begin by installing all system packages required by NetBox and its dependencies. Note that beginning with NetBox v2.8, Python 3.6 or later is required.
# apt-get install -y python3.6 python3-pip python3-venv python3-dev build-essential libxml2-dev libxslt1-dev libffi-dev libpq-dev libssl-dev zlib1g-dev####:/opt/netbox$ sudo apt-get install -y python3.6 python3-pip python3-venv python3-dev build-essential libxml2-dev libxslt1-dev libffi-dev libpq-dev libssl-dev zlib1g-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
libffi-dev is already the newest version (3.2.1-4).
python3-dev is already the newest version (3.5.1-3).
python3-venv is already the newest version (3.5.1-3).
libpq-dev is already the newest version (9.5.21-0ubuntu0.16.04.1).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.16).
libxml2-dev is already the newest version (2.9.3+dfsg1-1ubuntu0.7).
libxslt1-dev is already the newest version (1.1.28-2.1ubuntu0.3).
zlib1g-dev is already the newest version (1:1.2.8.dfsg-2ubuntu4.3).
python3-pip is already the newest version (8.1.1-2ubuntu0.4).
python3.6 is already the newest version (3.6.10-1+xenial1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.My python versions are :####:/opt/netbox$ python -VPython 2.7.12####:/opt/netbox$ python3 -VPython 3.5.2####:/opt/netbox$ python3.6 -VPython 3.6.10What am I missing?
Attached are the notes I made for myself of the Netbox install on
Ubuntu 20.04 and DB migration including the PostgreSQL DB backup and
restore commands.
You should be able to upgrade to 2.7.11 or 2.7.12 on 16.04 with no problems if you want to get the versions closer together.
In summary
I built a new Ubuntu 20.04 server and installed Netbox 2.7.11 on it.
Performed a backup and restore of the PostgreSQL DB on my Ubuntu 16.04 server which was also running Netbox at 2.7.11.
Restored the DB backup onto the new Ubunti 20.04 server.
Hope it helps.