class 'pkg_resources.VersionConflict' after v2.7.11 upgrade #3531

Closed
opened 2025-12-29 18:29:43 +01:00 by adam · 5 comments
Owner

Originally created by @CraigRMoore on GitHub (Apr 2, 2020).

Environment

  • Python version: 3.5.6
  • NetBox version: 2.7.11

Steps to Reproduce

  1. From the list of tenants select an existing tenant
  2. Error occurs
  3. Try and add a new tenant
  4. Error occurs

Tenant form or new tenant form appears

<class 'pkg_resources.VersionConflict'>

(setuptools 28.8.0 (/opt/netbox-2.7.11/venv/lib/python3.5/site-packages), Requirement.parse('setuptools>=36'))

Originally created by @CraigRMoore on GitHub (Apr 2, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.5.6 * NetBox version: 2.7.11 <!-- Can no longer edit or create a new tenant Problem also seems to be associated to racks as well Our production environment is currently sitting on v2.6.7 Upgrade path I have tested is: v2.6.7 -> v2.6.12 -> v2.7.0 -> v2.7.1 -> v2.7.10 -> v2.7.11 --> ### Steps to Reproduce 1. From the list of tenants select an existing tenant 2. Error occurs 3. Try and add a new tenant 4. Error occurs <!-- What did you expect to happen? --> Tenant form or new tenant form appears <!-- What happened instead? --> <class 'pkg_resources.VersionConflict'> (setuptools 28.8.0 (/opt/netbox-2.7.11/venv/lib/python3.5/site-packages), Requirement.parse('setuptools>=36'))
adam closed this issue 2025-12-29 18:29:44 +01:00
Author
Owner

@candlerb commented on GitHub (Apr 2, 2020):

@CraigRMoore, what OS are you running Netbox under?

This problem started in 2.7.10, and I reported this with Ubuntu 16.04. There are three other reports here, here, here but those don't say what OS is involved - possibly CentOS 6/7?

Workaround:

echo "setuptools>=36" >local_requirements.txt
./upgrade.sh
@candlerb commented on GitHub (Apr 2, 2020): @CraigRMoore, what OS are you running Netbox under? This problem started in 2.7.10, and I reported this with [Ubuntu 16.04](https://groups.google.com/d/msg/netbox-discuss/hxvLVblGdKc/q7hIAKUOHwAJ). There are three other reports [here](https://groups.google.com/forum/#!topic/netbox-discuss/QquDZFgjlhI), [here](https://groups.google.com/forum/#!topic/netbox-discuss/ArMjPCsN4uU), [here](https://groups.google.com/forum/#!topic/netbox-discuss/FUeuMqs7sUk) but those don't say what OS is involved - possibly CentOS 6/7? Workaround: ``` echo "setuptools>=36" >local_requirements.txt ./upgrade.sh ```
Author
Owner

@jeremystretch commented on GitHub (Apr 2, 2020):

As discussed on the mailing list, this is not a NetBox bug. The error is occurring because you're running a very outdated version of setuptools, and pip doesn't enforce the requirement above (setuptools>=36) for whatever reason. (setuptools gets installed automatically when creating a virtual environment.). If anything, this is a bug in pip, or possibly pkg_resources.

You can work around it by upgrading your system installation of setuptools, then running the upgrade script again:

# pip install -U setuptools
# ./upgrade.sh

Pip should then install the updated setuptools release when the virtualenv is created. Like most Python projects, we don't track it as an explicit dependency.

@jeremystretch commented on GitHub (Apr 2, 2020): As discussed on the mailing list, this is not a NetBox bug. The error is occurring because you're running a very outdated version of `setuptools`, and `pip` doesn't enforce the requirement above (`setuptools>=36`) for whatever reason. (`setuptools` gets installed automatically when creating a virtual environment.). If anything, this is a bug in pip, or possibly `pkg_resources`. You can work around it by upgrading your **system** installation of `setuptools`, then running the upgrade script again: ``` # pip install -U setuptools # ./upgrade.sh ``` Pip should then install the updated `setuptools` release when the virtualenv is created. Like most Python projects, we don't track it as an explicit dependency.
Author
Owner

@candlerb commented on GitHub (Apr 2, 2020):

I note that someone on the list had upgraded their setuptools to 46.1.1 and still got the problem:
https://groups.google.com/forum/#!topic/netbox-discuss/ArMjPCsN4uU

In any case, can I politely suggest that the requirement to upgrade setuptools be mentioned in the installation/upgrade documentation. It was not necessary prior to 2.7.10, and it's becoming a frequent support issue.

@candlerb commented on GitHub (Apr 2, 2020): I note that someone on the list had upgraded their setuptools to 46.1.1 and still got the problem: <https://groups.google.com/forum/#!topic/netbox-discuss/ArMjPCsN4uU> In any case, can I politely suggest that the requirement to upgrade setuptools be mentioned in the installation/upgrade documentation. It was not necessary prior to 2.7.10, and it's becoming a frequent support issue.
Author
Owner

@CraigRMoore commented on GitHub (Apr 2, 2020):

Thanks very much Brian,

Apologies for not noticing the previously logged cases…
We are running CentOS 7.4.1708

Regards,

Craig.

From: Brian Candler notifications@github.com
Sent: Thursday, 2 April 2020 11:51 PM
To: netbox-community/netbox netbox@noreply.github.com
Cc: Craig Moore Craig.Moore@tasmanet.com.au; Mention mention@noreply.github.com
Subject: Re: [netbox-community/netbox] class 'pkg_resources.VersionConflict' after v2.7.11 upgrade (#4437)

@CraigRMoorehttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FCraigRMoore&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C58971fda1d9a4b51590008d7d70477b5%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214286500727999&sdata=CxkTpTi5bpnJeTRehFIXMneSbb19VZhfM5mEzeOBTxc%3D&reserved=0, what OS are you running Netbox under?

This problem started in 2.7.10, and I reported this under Ubuntu 16.04https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsg%2Fnetbox-discuss%2FhxvLVblGdKc%2Fq7hIAKUOHwAJ&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C58971fda1d9a4b51590008d7d70477b5%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214286500738001&sdata=aVCR9nYzBtYbs4VPZcFPfeZh3bCmL%2FinBdDJlQwQdk0%3D&reserved=0. There are three other reports herehttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fforum%2F%23!topic%2Fnetbox-discuss%2FQquDZFgjlhI&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C58971fda1d9a4b51590008d7d70477b5%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214286500738001&sdata=Yg4vkUlZIxYSh9dgsyfcCMuhwyzW7WVI%2BxwyZN%2BhpUM%3D&reserved=0, herehttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fforum%2F%23!topic%2Fnetbox-discuss%2FArMjPCsN4uU&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C58971fda1d9a4b51590008d7d70477b5%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214286500747994&sdata=%2FUFAQpucDNvLYwTQZa%2B5WtTgphJBQGfZBreQ1yauzbM%3D&reserved=0, herehttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fforum%2F%23!topic%2Fnetbox-discuss%2FFUeuMqs7sUk&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C58971fda1d9a4b51590008d7d70477b5%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214286500747994&sdata=e3Vh5sZnMV0W7j2%2BAqmTYI%2BsTJot7azng8mrRxqgpwg%3D&reserved=0 but those don't say what OS is involved - possibly CentOS 6/7?

Workaround:

echo "setuptools>=36" >local_requirements.txt

./upgrade.sh


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnetbox-community%2Fnetbox%2Fissues%2F4437%23issuecomment-607826258&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C58971fda1d9a4b51590008d7d70477b5%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214286500747994&sdata=WsCuWCp0Z%2FkcgurzvxjSsExsqEh8hfUg3QZhKPAo1%2FQ%3D&reserved=0, or unsubscribehttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI2ECW6E6LGFALFKLH7BXTDRKSC2LANCNFSM4LZ2B4ZQ&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C58971fda1d9a4b51590008d7d70477b5%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214286500757990&sdata=tUzS0Q4BRtavsg3lz%2BvUn6lWV3jA%2BTgaFjjGjw55SgM%3D&reserved=0.

@CraigRMoore commented on GitHub (Apr 2, 2020): Thanks very much Brian, Apologies for not noticing the previously logged cases… We are running CentOS 7.4.1708 Regards, Craig. From: Brian Candler <notifications@github.com> Sent: Thursday, 2 April 2020 11:51 PM To: netbox-community/netbox <netbox@noreply.github.com> Cc: Craig Moore <Craig.Moore@tasmanet.com.au>; Mention <mention@noreply.github.com> Subject: Re: [netbox-community/netbox] class 'pkg_resources.VersionConflict' after v2.7.11 upgrade (#4437) @CraigRMoore<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FCraigRMoore&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C58971fda1d9a4b51590008d7d70477b5%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214286500727999&sdata=CxkTpTi5bpnJeTRehFIXMneSbb19VZhfM5mEzeOBTxc%3D&reserved=0>, what OS are you running Netbox under? This problem started in 2.7.10, and I reported this under Ubuntu 16.04<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsg%2Fnetbox-discuss%2FhxvLVblGdKc%2Fq7hIAKUOHwAJ&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C58971fda1d9a4b51590008d7d70477b5%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214286500738001&sdata=aVCR9nYzBtYbs4VPZcFPfeZh3bCmL%2FinBdDJlQwQdk0%3D&reserved=0>. There are three other reports here<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fforum%2F%23!topic%2Fnetbox-discuss%2FQquDZFgjlhI&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C58971fda1d9a4b51590008d7d70477b5%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214286500738001&sdata=Yg4vkUlZIxYSh9dgsyfcCMuhwyzW7WVI%2BxwyZN%2BhpUM%3D&reserved=0>, here<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fforum%2F%23!topic%2Fnetbox-discuss%2FArMjPCsN4uU&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C58971fda1d9a4b51590008d7d70477b5%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214286500747994&sdata=%2FUFAQpucDNvLYwTQZa%2B5WtTgphJBQGfZBreQ1yauzbM%3D&reserved=0>, here<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fforum%2F%23!topic%2Fnetbox-discuss%2FFUeuMqs7sUk&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C58971fda1d9a4b51590008d7d70477b5%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214286500747994&sdata=e3Vh5sZnMV0W7j2%2BAqmTYI%2BsTJot7azng8mrRxqgpwg%3D&reserved=0> but those don't say what OS is involved - possibly CentOS 6/7? Workaround: echo "setuptools>=36" >local_requirements.txt ./upgrade.sh — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnetbox-community%2Fnetbox%2Fissues%2F4437%23issuecomment-607826258&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C58971fda1d9a4b51590008d7d70477b5%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214286500747994&sdata=WsCuWCp0Z%2FkcgurzvxjSsExsqEh8hfUg3QZhKPAo1%2FQ%3D&reserved=0>, or unsubscribe<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI2ECW6E6LGFALFKLH7BXTDRKSC2LANCNFSM4LZ2B4ZQ&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C58971fda1d9a4b51590008d7d70477b5%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214286500757990&sdata=tUzS0Q4BRtavsg3lz%2BvUn6lWV3jA%2BTgaFjjGjw55SgM%3D&reserved=0>.
Author
Owner

@CraigRMoore commented on GitHub (Apr 3, 2020):

Just confirming that I have upgraded setuptools to 46.1.3 on Centos 7.4.1708 and that has fixed the problem.

From: Brian Candler notifications@github.com
Sent: Friday, 3 April 2020 12:52 AM
To: netbox-community/netbox netbox@noreply.github.com
Cc: Craig Moore Craig.Moore@tasmanet.com.au; Mention mention@noreply.github.com
Subject: Re: [netbox-community/netbox] class 'pkg_resources.VersionConflict' after v2.7.11 upgrade (#4437)

I note that someone on the list had upgraded their setuptools to 46.1.1 and still got the problem:
https://groups.google.com/forum/#!topic/netbox-discuss/ArMjPCsN4uUhttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fforum%2F%23!topic%2Fnetbox-discuss%2FArMjPCsN4uU&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C133b94aebbb540fa6f9d08d7d70d030a%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214323197494111&sdata=hosQPLpSgJRnu4aRMsSjpegVV33K2XaQYKzDxDeSu%2F0%3D&reserved=0

In any case, can I politely suggest that the requirement to upgrade setuptools be mentioned in the installation/upgrade documentation. It was not necessary prior to 2.7.10, and it's becoming a frequent support issue.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnetbox-community%2Fnetbox%2Fissues%2F4437%23issuecomment-607859823&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C133b94aebbb540fa6f9d08d7d70d030a%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214323197494111&sdata=67KneELSgWiF%2B4D8UARA%2B%2FfzuxX9u0ztNOGJvBj38%2Fo%3D&reserved=0, or unsubscribehttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI2ECW3UQNMQRHKJJ7IK6KTRKSJ7XANCNFSM4LZ2B4ZQ&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C133b94aebbb540fa6f9d08d7d70d030a%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214323197494111&sdata=bKG06x1NgNE9CXHJQX4BwIBsZxt1EZkgtYbQLto0YxY%3D&reserved=0.

@CraigRMoore commented on GitHub (Apr 3, 2020): Just confirming that I have upgraded setuptools to 46.1.3 on Centos 7.4.1708 and that has fixed the problem. From: Brian Candler <notifications@github.com> Sent: Friday, 3 April 2020 12:52 AM To: netbox-community/netbox <netbox@noreply.github.com> Cc: Craig Moore <Craig.Moore@tasmanet.com.au>; Mention <mention@noreply.github.com> Subject: Re: [netbox-community/netbox] class 'pkg_resources.VersionConflict' after v2.7.11 upgrade (#4437) I note that someone on the list had upgraded their setuptools to 46.1.1 and still got the problem: https://groups.google.com/forum/#!topic/netbox-discuss/ArMjPCsN4uU<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fforum%2F%23!topic%2Fnetbox-discuss%2FArMjPCsN4uU&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C133b94aebbb540fa6f9d08d7d70d030a%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214323197494111&sdata=hosQPLpSgJRnu4aRMsSjpegVV33K2XaQYKzDxDeSu%2F0%3D&reserved=0> In any case, can I politely suggest that the requirement to upgrade setuptools be mentioned in the installation/upgrade documentation. It was not necessary prior to 2.7.10, and it's becoming a frequent support issue. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnetbox-community%2Fnetbox%2Fissues%2F4437%23issuecomment-607859823&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C133b94aebbb540fa6f9d08d7d70d030a%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214323197494111&sdata=67KneELSgWiF%2B4D8UARA%2B%2FfzuxX9u0ztNOGJvBj38%2Fo%3D&reserved=0>, or unsubscribe<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI2ECW3UQNMQRHKJJ7IK6KTRKSJ7XANCNFSM4LZ2B4ZQ&data=02%7C01%7Ccraig.moore%40tasmanet.com.au%7C133b94aebbb540fa6f9d08d7d70d030a%7Cb53dc580ab7847208b30536f36d398ac%7C0%7C0%7C637214323197494111&sdata=bKG06x1NgNE9CXHJQX4BwIBsZxt1EZkgtYbQLto0YxY%3D&reserved=0>.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3531