pip install newrelic Throws Error
mkrdip opened this issue · 10 comments
Description
When trying to do pip install newrelic
it throws an error and continues trying to install lower versions but throws the same error, please check the bottom of this issue to see what the error message looks like.
has inconsistent version: filename has '7.16.0.178', but metadata has '0.0.0'
Expected Behavior
newrelic
package meeting this strict pip policy described here: https://pip.pypa.io/en/stable/user_guide/#watch-out-for and community reference here: pypa/pip#9203.
Steps to Reproduce
Just try doing pip install newrelic
Your Environment
OS: macOS 12.5.1
Chip: Apple M1 Max
Python: 3.10.5
Error Messages
Collecting newrelic
Using cached newrelic-8.0.0.179.tar.gz (881 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/07/b9/44f9ab7751365d20fd81238455e9bc0964f65e425521fb021bbe300e5701/newrelic-8.0.0.179.tar.gz (from https://pypi.org/simple/newrelic/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*): Requested newrelic from https://files.pythonhosted.org/packages/07/b9/44f9ab7751365d20fd81238455e9bc0964f65e425521fb021bbe300e5701/newrelic-8.0.0.179.tar.gz has inconsistent version: filename has '8.0.0.179', but metadata has '0.0.0'
Using cached newrelic-7.16.0.178.tar.gz (879 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/b8/13/5c87086af3e52c191dc36d8d5ee4579172979d26d0728a283a54f85a4d3e/newrelic-7.16.0.178.tar.gz (from https://pypi.org/simple/newrelic/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*): Requested newrelic from https://files.pythonhosted.org/packages/b8/13/5c87086af3e52c191dc36d8d5ee4579172979d26d0728a283a54f85a4d3e/newrelic-7.16.0.178.tar.gz has inconsistent version: filename has '7.16.0.178', but metadata has '0.0.0'
Using cached newrelic-7.14.0.177.tar.gz (879 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/a5/4f/1e5a7c7b21e25fb554ad534d028651ad2f55c2014521cf20a726d68439f1/newrelic-7.14.0.177.tar.gz (from https://pypi.org/simple/newrelic/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*): Requested newrelic from https://files.pythonhosted.org/packages/a5/4f/1e5a7c7b21e25fb554ad534d028651ad2f55c2014521cf20a726d68439f1/newrelic-7.14.0.177.tar.gz has inconsistent version: filename has '7.14.0.177', but metadata has '0.0.0'
Using cached newrelic-7.12.0.176.tar.gz (871 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Temporary Fix
python -m pip install --upgrade --no-cache-dir --use-deprecated=legacy-resolver newrelic
Hi @mkrdip! Is this issue still occurring for you with the latest version of newrelic (v8.1.0.180)? We are seeing successful installation in our testing.
Are you using same environment spec as me?
OS: macOS 12.5.1
Chip: Apple M1 Max
Python: 3.10.5
We were able to reproduce this on our end with some interesting results. It looks like we're able to install just fine inside of a virtual environment, but not to the global python installation. Additionally this only seems to affect M1 macs and not linux ARM64v8 installations.
We'll track this down and hope to release a patch for it soon, but in the meantime you may have success with using virtual environments to work around this issue.
This is also happening for me on latest newrelic packages, even for 8.1.0.180
It goes back as far as 7.6.0.173 and the latest package it actually manages to install using pip is 7.4.0.172
Follows the log for the latest attempt:
➜ adm git:(devops#4815) ✗ pip3 install -U newrelic
Requirement already satisfied: newrelic in /opt/homebrew/lib/python3.10/site-packages (7.4.0.172)
Collecting newrelic
Using cached newrelic-8.1.0.180.tar.gz (884 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/73/59/9a1070788d2462bc38ed7af95f0c0878a597a82307daa60c1015443572b5/newrelic-8.1.0.180.tar.gz (from https://pypi.org/simple/newrelic/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*): Requested newrelic from https://files.pythonhosted.org/packages/73/59/9a1070788d2462bc38ed7af95f0c0878a597a82307daa60c1015443572b5/newrelic-8.1.0.180.tar.gz has inconsistent version: filename has '8.1.0.180', but metadata has '0.0.0'
Using cached newrelic-8.0.0.179.tar.gz (881 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/07/b9/44f9ab7751365d20fd81238455e9bc0964f65e425521fb021bbe300e5701/newrelic-8.0.0.179.tar.gz (from https://pypi.org/simple/newrelic/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*): Requested newrelic from https://files.pythonhosted.org/packages/07/b9/44f9ab7751365d20fd81238455e9bc0964f65e425521fb021bbe300e5701/newrelic-8.0.0.179.tar.gz has inconsistent version: filename has '8.0.0.179', but metadata has '0.0.0'
Using cached newrelic-7.16.0.178.tar.gz (879 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/b8/13/5c87086af3e52c191dc36d8d5ee4579172979d26d0728a283a54f85a4d3e/newrelic-7.16.0.178.tar.gz (from https://pypi.org/simple/newrelic/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*): Requested newrelic from https://files.pythonhosted.org/packages/b8/13/5c87086af3e52c191dc36d8d5ee4579172979d26d0728a283a54f85a4d3e/newrelic-7.16.0.178.tar.gz has inconsistent version: filename has '7.16.0.178', but metadata has '0.0.0'
Using cached newrelic-7.14.0.177.tar.gz (879 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/a5/4f/1e5a7c7b21e25fb554ad534d028651ad2f55c2014521cf20a726d68439f1/newrelic-7.14.0.177.tar.gz (from https://pypi.org/simple/newrelic/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*): Requested newrelic from https://files.pythonhosted.org/packages/a5/4f/1e5a7c7b21e25fb554ad534d028651ad2f55c2014521cf20a726d68439f1/newrelic-7.14.0.177.tar.gz has inconsistent version: filename has '7.14.0.177', but metadata has '0.0.0'
Using cached newrelic-7.12.0.176.tar.gz (871 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/64/32/156d412f77808f2983ff3799556a46e1ea65d9f2a0961c982b0a4c40a94c/newrelic-7.12.0.176.tar.gz (from https://pypi.org/simple/newrelic/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*): Requested newrelic from https://files.pythonhosted.org/packages/64/32/156d412f77808f2983ff3799556a46e1ea65d9f2a0961c982b0a4c40a94c/newrelic-7.12.0.176.tar.gz has inconsistent version: filename has '7.12.0.176', but metadata has '0.0.0'
Using cached newrelic-7.10.0.175.tar.gz (858 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/76/7f/ced0b98ae790f58fb0b2c2a16bda995fa916140cca24b7697599a80fc6a9/newrelic-7.10.0.175.tar.gz (from https://pypi.org/simple/newrelic/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*): Requested newrelic from https://files.pythonhosted.org/packages/76/7f/ced0b98ae790f58fb0b2c2a16bda995fa916140cca24b7697599a80fc6a9/newrelic-7.10.0.175.tar.gz has inconsistent version: filename has '7.10.0.175', but metadata has '0.0.0'
Using cached newrelic-7.8.0.174.tar.gz (852 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/35/4d/c1b1bbb730076282afbc161ae889dbd00da42e4b36d70046e2a843679252/newrelic-7.8.0.174.tar.gz (from https://pypi.org/simple/newrelic/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*): Requested newrelic from https://files.pythonhosted.org/packages/35/4d/c1b1bbb730076282afbc161ae889dbd00da42e4b36d70046e2a843679252/newrelic-7.8.0.174.tar.gz has inconsistent version: filename has '7.8.0.174', but metadata has '0.0.0'
Using cached newrelic-7.6.0.173.tar.gz (847 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/85/e7/a6b658d85019ec9a587fc8cc967ab076f5e9a68c5d0479f0d9c3d9730d2f/newrelic-7.6.0.173.tar.gz (from https://pypi.org/simple/newrelic/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*): Requested newrelic from https://files.pythonhosted.org/packages/85/e7/a6b658d85019ec9a587fc8cc967ab076f5e9a68c5d0479f0d9c3d9730d2f/newrelic-7.6.0.173.tar.gz has inconsistent version: filename has '7.6.0.173', but metadata has '0.0.0'
➜ adm git:(devops#4815) ✗ pip3 freeze|grep -i newrelic
newrelic==7.4.0.172
I'm getting the same behavior both on a M1 Mac mini running macOS Monterey 12.6 (latest) as on a MacBook Pro M1 Pro running macOS Monterey 12.6 (latest)
If you could use a workaround for installing the agent, you can install setuptools-scm<7
into your environment BEFORE installing the agent. That for some reason is fixing the issue.
We're still trying to work out exactly where the bug is with pip
, setuptools
, and setuptools-scm
. It seems like a build isolation issue but we've been unable to track it down to exactly what the issue is. We're still working on a permanent fix for this.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hello stalebot! Please don't close this - this is still impacting users, us included.
Actually those changes are unreleased into pip, might not be fixed yet on their end.
Upgrade to latest pip (2022.3.1) won't be enough installing pip from main branch do help, the fix didn't got to any release of pip yet.
If you want to test you could install pip from the github repo's main branch, or wait for the next release.
This issue has been fixed in M1 with macOS Ventura 13.2.1
after upgradingpip
to 23.0.1
, so I am closing this. I appreciate your replies and help.
python -m pip install --upgrade pip
pip install newrelic
Still, I really would like to know what fixed it, the pip
upgrade or the latest newrelic
version 8.7.0
?