Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to install wheel on alpine #9735

Closed
1 task done
RCheese opened this issue Mar 25, 2021 · 3 comments
Closed
1 task done

Impossible to install wheel on alpine #9735

RCheese opened this issue Mar 25, 2021 · 3 comments
Labels
resolution: invalid Invalid issue/PR

Comments

@RCheese
Copy link

RCheese commented Mar 25, 2021

pip version

21.0.1

Python version

3.8

OS

alpine 3.12

Additional information

No response

Description

since pip 20.3 and PEP 600 package with manylinux*_compatible tags has no chance to be installed under alpine. Now PyPI has too few packages with manylinux_alpine compatible tags, but older packets were good. e.g. orjson or brotlipy were broken. PEP 600 doesn't provide clear information about right way to live now

Expected behavior

(e.g.) orjson successfully installed (by latest *.whl)

How to Reproduce

docker run -it python:3.8-alpine ash
echo 'manylinux2014_compatible = 1' > /usr/local/lib/python3.8/_manylinux.py
pip install orjson

Output

Collecting orjson
  Downloading orjson-3.5.1.tar.gz (659 kB)
     |████████████████████████████████| 659 kB 659 kB/s 
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-twhh_499/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- maturin==0.9.0
       cwd: None
  Complete output (57 lines):
  Collecting maturin==0.9.0
    Downloading maturin-0.9.0.tar.gz (85 kB)
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
      Preparing wheel metadata: started
      Preparing wheel metadata: finished with status 'done'
  Collecting toml~=0.10.0
    Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
  Building wheels for collected packages: maturin
    Building wheel for maturin (PEP 517): started
    Building wheel for maturin (PEP 517): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp45vghfb9
         cwd: /tmp/pip-install-m2lctfk3/maturin_82131e6b848a42adaf359b0d30ff7e46
    Complete output (36 lines):
    running bdist_wheel
    running build
    installing to build/bdist.linux-x86_64/wheel
    running install
    Traceback (most recent call last):
      File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
        main()
      File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 204, in build_wheel
        return _build_backend().build_wheel(wheel_directory, config_settings,
      File "/tmp/pip-build-env-sz1zpm3w/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 208, in build_wheel
        return self._build_with_temp_dir(['bdist_wheel'], '.whl',
      File "/tmp/pip-build-env-sz1zpm3w/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 194, in _build_with_temp_dir
        self.run_setup()
      File "/tmp/pip-build-env-sz1zpm3w/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 142, in run_setup
        exec(compile(code, __file__, 'exec'), locals())
      File "setup.py", line 96, in <module>
        setup(
      File "/tmp/pip-build-env-sz1zpm3w/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/usr/local/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/local/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/tmp/pip-build-env-sz1zpm3w/overlay/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 228, in run
        self.run_command('install')
      File "/usr/local/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "setup.py", line 58, in run
        raise RuntimeError(
    RuntimeError: cargo not found in PATH. Please install rust (https://www.rust-lang.org/tools/install) and try again
    ----------------------------------------
    ERROR: Failed building wheel for maturin
  Failed to build maturin
  ERROR: Could not build wheels for maturin which use PEP 517 and cannot be installed directly
  ----------------------------------------

Code of Conduct

  • I agree to follow the PSF Code of Conduct
@RCheese RCheese added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Mar 25, 2021
@uranusjr
Copy link
Member

Alpine Linux uses musl, while manylinux wheels are based on glibc, so you can't install manylinux wheels on Alpine. They won't work even if you managed to put the files inside your system.

@uranusjr uranusjr added resolution: invalid Invalid issue/PR and removed S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Mar 25, 2021
@RCheese
Copy link
Author

RCheese commented Mar 25, 2021

Yes! But it worked before! And issues on supports it in packages repos estimates in thousands

@RonnyPfannschmidt
Copy link
Contributor

@RCheese it worked by random luck and you are very lucky nothing horrible happened, pip just got better and now things that where never supported to begin with, don't install, it's time for you to fix your build

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: invalid Invalid issue/PR
Projects
None yet
Development

No branches or pull requests

3 participants