<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>virtual environments - Spheron1</title>
	<atom:link href="https://www.spheron1.uk/tag/virtual-environments/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.spheron1.uk</link>
	<description></description>
	<lastBuildDate>Fri, 02 May 2025 14:44:10 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Upgrading NetBox with plugins installed</title>
		<link>https://www.spheron1.uk/2025/05/02/upgrading-netbox-with-plugins-installed/</link>
					<comments>https://www.spheron1.uk/2025/05/02/upgrading-netbox-with-plugins-installed/#respond</comments>
		
		<dc:creator><![CDATA[digitaldisaster]]></dc:creator>
		<pubDate>Fri, 02 May 2025 14:44:10 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[DCIM]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[IPAM]]></category>
		<category><![CDATA[NetBox]]></category>
		<category><![CDATA[PIP]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[venv]]></category>
		<category><![CDATA[virtual environments]]></category>
		<guid isPermaLink="false">https://www.spheron1.uk/?p=3060</guid>

					<description><![CDATA[<p>NetBox is an excellent open source IP Address Management (IPAM) and DataCenter Infrastructure Management (DCIM) with a huge amount of built-in functionality. For anything that isn&#8217;t covered out-of-the-box, there is also a wealth of third party plugins. One of these plugins is NetBox Inventory which adds asset tracking functionality, however the installation instructions seem to forget to mention that you&#46;&#46;&#46;</p>
<p>The post <a href="https://www.spheron1.uk/2025/05/02/upgrading-netbox-with-plugins-installed/">Upgrading NetBox with plugins installed</a> first appeared on <a href="https://www.spheron1.uk">Spheron1</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><a href="https://github.com/netbox-community/netbox" title="">NetBox</a> is an excellent open source IP Address Management (IPAM) and DataCenter Infrastructure Management (DCIM) with a huge amount of built-in functionality. For anything that isn&#8217;t covered out-of-the-box, there is also a wealth of <a href="https://netboxlabs.com/netbox-plugins/" title="">third party plugins</a>.</p>



<p>One of these plugins is <a href="https://github.com/ArnesSI/netbox-inventory" title="">NetBox Inventory</a> which adds asset tracking functionality, however the installation instructions seem to forget to mention that you need to create an &#8220;/opt/netbox/local_requirements.txt&#8221; file with &#8220;netbox-inventory&#8221; in it (or append this to the file if it already exists) and this also isn&#8217;t covered by the <a href="https://netboxlabs.com/docs/netbox/en/stable/plugins/installation/" title="">official NetBox plugin installation documentation</a>.</p>



<p>If this isn&#8217;t done, then NetBox upgrades will fail during the database migrations because the Python venv gets recreated by the /opt/netbox/upgrade.sh script and so the &#8220;netbox-inventory&#8221; package will be missing:</p>



<pre class="wp-block-code"><code>Skipping local dependencies (local_requirements.txt not found)
Applying database migrations (python3 netbox/manage.py migrate)...
Traceback (most recent call last):
  File "/opt/netbox/netbox/netbox/settings.py", line 801, in &lt;module>
    plugin = importlib.import_module(plugin_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name&#91;level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "&lt;frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "&lt;frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "&lt;frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'netbox_inventory'

During handling of the above exception, another exception occurred:
netbox-inventory

Traceback (most recent call last):
  File "/opt/netbox/netbox/manage.py", line 10, in &lt;module>
    execute_from_command_line(sys.argv)
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/base.py", line 405, in run_from_argv
    parser = self.create_parser(argv&#91;0], argv&#91;1])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/base.py", line 368, in create_parser
    self.add_arguments(parser)
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/commands/migrate.py", line 50, in add_arguments
    choices=tuple(connections),
            ^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/utils/connection.py", line 73, in __iter__
    return iter(self.settings)
                ^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/utils/functional.py", line 47, in __get__
    res = instance.__dict__&#91;self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/utils/connection.py", line 45, in settings
    self._settings = self.configure_settings(self._settings)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/db/utils.py", line 148, in configure_settings
    databases = super().configure_settings(databases)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/utils/connection.py", line 50, in configure_settings
    settings = getattr(django_settings, self.settings_name)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/conf/__init__.py", line 81, in __getattr__
    self._setup(name)
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/conf/__init__.py", line 68, in _setup
    self._wrapped = Settings(settings_module)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/conf/__init__.py", line 166, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name&#91;level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "&lt;frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "&lt;frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "&lt;frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "&lt;frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "&lt;frozen importlib._bootstrap_external>", line 999, in exec_module
  File "&lt;frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/opt/netbox/netbox/netbox/settings.py", line 804, in &lt;module>
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Unable to import plugin netbox_inventory: Module not found. Check that the plugin module has been installed within the correct Python environment.</code></pre><p>The post <a href="https://www.spheron1.uk/2025/05/02/upgrading-netbox-with-plugins-installed/">Upgrading NetBox with plugins installed</a> first appeared on <a href="https://www.spheron1.uk">Spheron1</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.spheron1.uk/2025/05/02/upgrading-netbox-with-plugins-installed/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Object Caching 17/42 objects using Redis
Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Database Caching 11/35 queries in 0.024 seconds using Redis

Served from: spheron1.uk @ 2026-04-28 19:58:54 by W3 Total Cache
-->