pypa / pip

The Python package installer
https://pip.pypa.io/
MIT License
9.55k stars 3.04k forks source link

pip install fails on pip #12069

Closed ep4sh closed 1 year ago

ep4sh commented 1 year ago

Description

Just install the attached packages with pip, see below >>

Expected behavior

pip install successfully

pip version

pip 23.1.2

Python version

Python 3.11.3 (main, Apr 7 2023, 19:29:16) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin

OS

MacoS monterey 12.6

How to Reproduce

cat <<EOF >> requirements.txt
ansible==6.7.0
ansible-compat==2.2.1
ansible-core==2.13.8
ansible-lint==6.7.0
arrow==1.2.3
attrs==22.1.0
binaryornot==0.4.4
black==22.8.0
bracex==2.3.post1
Cerberus==1.3.2
certifi==2022.9.24
cffi==1.15.1
chardet==5.0.0
charset-normalizer==2.1.1
click==8.1.3
click-help-colors==0.9.1
commonmark==0.9.1
cookiecutter==2.1.1
cryptography==38.0.1
docker==6.0.0
enrich==1.2.7
filelock==3.8.0
idna==3.4
iniconfig==1.1.1
Jinja2==3.1.2
jinja2-time==0.2.0
jsonschema==4.16.0
MarkupSafe==2.1.1
molecule==4.0.1
molecule-docker==2.0.0
mypy-extensions==0.4.3
packaging==21.3
pathspec==0.10.1
platformdirs==2.5.2
pluggy==1.0.0
py==1.11.0
pycparser==2.21
Pygments==2.13.0
pyparsing==3.0.9
pyrsistent==0.18.1
pytest==7.1.3
pytest-html==3.1.1
pytest-metadata==2.0.2
pytest-molecule==2.0.0
python-dateutil==2.8.2
python-slugify==6.1.2
PyYAML==6.0
requests==2.28.1
resolvelib==0.8.1
rich==12.5.1
ruamel.yaml==0.17.21
ruamel.yaml.clib==0.2.6
six==1.16.0
subprocess-tee==0.3.5
text-unidecode==1.3
tomli==2.0.1
urllib3==1.26.12
wcmatch==8.4.1
websocket-client==1.4.1
yamllint==1.28.0
EOF

pip install -r requirements.txt

Output

Building wheels for collected packages: ruamel.yaml.clib
  Building wheel for ruamel.yaml.clib (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for ruamel.yaml.clib (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [34 lines of output]
      /private/var/folders/0s/fs531rs954j07dx63_0rq83h0000gn/T/pip-build-env-dgiju_ih/overlay/lib/python3.11/site-packages/setuptools/dist.py:955: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated.
      !!

              ********************************************************************************
              Please replace its usage with implicit namespaces (PEP 420).

              See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages for details.
              ********************************************************************************

      !!
        ep.load()(self, ep.name, value)
      sys.argv ['setup.py', 'bdist_wheel', '--dist-dir', '/private/var/folders/0s/fs531rs954j07dx63_0rq83h0000gn/T/pip-wheel-2nol8jaq/.tmp-km9rche4']
      test compiling /var/folders/0s/fs531rs954j07dx63_0rq83h0000gn/T/tmp_ruamel_8vitqyju/test_ruamel_yaml.c -> test_ruamel_yaml OK
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-12-x86_64-cpython-311
      creating build/lib.macosx-12-x86_64-cpython-311/ruamel
      copying .ruamel/__init__.py -> build/lib.macosx-12-x86_64-cpython-311/ruamel
      creating build/lib.macosx-12-x86_64-cpython-311/ruamel/yaml
      copying .ruamel/yaml/__init__.py -> build/lib.macosx-12-x86_64-cpython-311/ruamel/yaml
      creating build/lib.macosx-12-x86_64-cpython-311/ruamel/yaml/clib
      copying ./__init__.py -> build/lib.macosx-12-x86_64-cpython-311/ruamel/yaml/clib
      copying ./LICENSE -> build/lib.macosx-12-x86_64-cpython-311/ruamel/yaml/clib
      running build_ext
      building '_ruamel_yaml' extension
      creating build/temp.macosx-12-x86_64-cpython-311
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/Users/pradchenko/wmx/devops/packer/wmx-scanners/venv/include -I/usr/local/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c _ruamel_yaml.c -o build/temp.macosx-12-x86_64-cpython-311/_ruamel_yaml.o
      _ruamel_yaml.c:198:12: fatal error: 'longintrepr.h' file not found
        #include "longintrepr.h"
                 ^~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for ruamel.yaml.clib
Failed to build ruamel.yaml.clib
ERROR: Could not build wheels for ruamel.yaml.clib, which is required to install pyproject.toml-based projects

Code of Conduct

notatallshaw commented 1 year ago

Is the error not clear? ruamel.yaml.clib is failing to build.

You should check that project for build instructions https://yaml.readthedocs.io / https://sourceforge.net/projects/ruamel-yaml-clib/support