Error: "metadata generation failed", can't install Artic Module
Andrew Henderson
I am trying to get started with downloading this project:
And I've downloaded the packages in the requirements file but I can't figure out why the artic package won't download. I am getting this error:
× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [312 lines of output] /Users/aishahalane/venv/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. warnings.warn( error: subprocess-exited-with-error × Building wheel for numpy (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [269 lines of output] … error: Command "/opt/concourse/worker/volumes/live/c1a1a6ef-e724-4ad9-52a7-d6d68451dacb/volume/python-split_1631807121927/_build_env/bin/llvm-ar rcs build/temp.macosx-10.9-x86_64-3.9/libnpymath.a build/temp.macosx-10.9-x86_64-3.9/numpy/core/src/npymath/npy_math.o build/temp.macosx-10.9-x86_64-3.9/build/src.macosx-10.9-x86_64-3.9/numpy/core/src/npymath/ieee754.o build/temp.macosx-10.9-x86_64-3.9/build/src.macosx-10.9-x86_64-3.9/numpy/core/src/npymath/npy_math_complex.o build/temp.macosx-10.9-x86_64-3.9/numpy/core/src/npymath/halffloat.o" failed with exit status 127 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for numpy ERROR: Failed to build one or more wheels Traceback (most recent call last): File "/Users/aishahalane/venv/lib/python3.9/site-packages/setuptools/installer.py", line 82, in fetch_build_egg subprocess.check_call(cmd) File "/Users/aishahalane/opt/anaconda3/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/Users/aishahalane/venv/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/_p/xqkc7m_n2_ngn8wdd3pgytp80000gn/T/tmph3_m5ewf', '--quiet', 'numpy<=1.18.4']' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "/private/var/folders/_p/xqkc7m_n2_ngn8wdd3pgytp80000gn/T/pip-req-build-s7mgwt47/setup.py", line 59, in <module> setup( File "/Users/aishahalane/venv/lib/python3.9/site-packages/setuptools/__init__.py", line 154, in setup _install_setup_requires(attrs) File "/Users/aishahalane/venv/lib/python3.9/site-packages/setuptools/__init__.py", line 148, in _install_setup_requires dist.fetch_build_eggs(dist.setup_requires) File "/Users/aishahalane/venv/lib/python3.9/site-packages/setuptools/dist.py", line 812, in fetch_build_eggs resolved_dists = pkg_resources.working_set.resolve( File "/Users/aishahalane/venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 771, in resolve dist = best[req.key] = env.best_match( File "/Users/aishahalane/venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1056, in best_match return self.obtain(req, installer) File "/Users/aishahalane/venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1068, in obtain return installer(requirement) File "/Users/aishahalane/venv/lib/python3.9/site-packages/setuptools/dist.py", line 883, in fetch_build_egg return fetch_build_egg(self, req) File "/Users/aishahalane/venv/lib/python3.9/site-packages/setuptools/installer.py", line 84, in fetch_build_egg raise DistutilsError(str(e)) from e distutils.errors.DistutilsError: Command '['/Users/aishahalane/venv/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/_p/xqkc7m_n2_ngn8wdd3pgytp80000gn/T/tmph3_m5ewf', '--quiet', 'numpy<=1.18.4']' returned non-zero exit status 1. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.How do I solve this problem?
6 Answers
I had this error while trying to install dotenv. With this command:
pip install dotenvFor anyone facing this error with dotenv. The right command actually is:
pip install python-dotenv 3 I faced a similar issue, due a recent change in pip. I solved it by adding the following to the installation command:
--use-deprecated=backtrack-on-build-failuresE.g. instead of pip install numpy I now ran:
pip install numpy --use-deprecated=backtrack-on-build-failures 5 I had the same problem with metadata-generation-failed. This GitHub issue comment helped me (Ubuntu 18.04):
sudo apt-get install python-dev
sudo apt-get install build-essential
python -m pip install -U pip or python3 -m pip install -U pip
pip3 install --upgrade setuptools 2 pip install numpy --use-deprecated=legacy-resolver can actually help, but there will be a red warning: pip's legacy dependency resolver does not consider dependency conflicts when selecting packages. anyway it solve my problem!
Downgrading setuptools worked for me
pip install "setuptools<58.0.0" 1 I was facing the same issue with another package. I have followed document . In this document, the 4 reasons behind failure.
My problem solved with 1st step only.
As mentioned there, I have upgraded pip using command: python -m pip install --upgrade pip