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

No Python 3.5 Wheel on PyPI #471

Closed
TobyRoseman opened this issue Mar 12, 2019 · 27 comments
Closed

No Python 3.5 Wheel on PyPI #471

TobyRoseman opened this issue Mar 12, 2019 · 27 comments

Comments

@TobyRoseman
Copy link

The latest version of llvmlite on PyPI doesn't have any wheels for Python 3.5. This means if someone tries to install llvmlite in a Python 3.5 environment, it will fail unless they happen to also have llvm-config installed.

@jvesely
Copy link
Contributor

jvesely commented Mar 12, 2019

It will also fail on almost all Ubuntu releases because they ship LLVM that wasn't built using the system default compiler (and passes incompatible flags).

@yzhao062
Copy link

This also happens to my library and an error log is attached: https://travis-ci.org/yzhao062/pyod/jobs/505039491

It was working with llvmlite 0.27.0 and stops working with llvmlite 0.27.1, although my library does not rely on llvmlite but numba only (numba>=0.35).

This only happens to python 3.5 (starting since around 10 hours ago). Thanks for fixing.

@sniperwrb
Copy link

Yes, it happened to me too since today morning.

I used Ubuntu 18.04 (which has python 3.6 easily available) and things went well.

@seibert
Copy link
Contributor

seibert commented Mar 13, 2019

We stopped making wheels for Python 3.5 some time ago, but it is clear we need to start again. The next release of numba (0.43) and llvmlite (0.28) are in process now and will include Python 3.5 wheels.

@mdekstrand
Copy link

@seibert thank you. I see the releases are tagged, do you have an ETA on wheel uploads?

If it is helpful for future planning: in my project using Numba (https://github.com/lenskit/lkpy), our Python version support goal is to support the Python version in the last stable (LTS if applicable) release of each of the major distributions (Ubuntu, RHEL/CentOS + EPEL, Debian). Debian Stretch is at Python 3.5. A reasonably short time after Debian Buster is released, will will no longer be supporting Python 3.5 unless specifically requested.

@astrojuanlu
Copy link

PSA: To protect your CI from breaking in these circumstances,

export PIP_PREFER_BINARY=true

(pip >= 18.0)

@yzhao062
Copy link

@Juanlu001 thanks for the note. Setting this env variable in CI tools takes care of the problem. Just by curiosity, is there any drawbacks of setting this to true? Tried to search online but did not find any documentation on this.

Thanks,

@astrojuanlu
Copy link

The "drawback" is that you won't live on the bleeding edge and the the latest release, even if it doesn't have a wheel yet. But that is not a real disadvantage, because most people nowadays assume that Python packages come in a pre-compiled fashiion, or at most with some light requirements. I also came here when my CI started failing, so I guess many people is in the same situation. The reality is that I only care about the latest wheel :)

@seibert
Copy link
Contributor

seibert commented Mar 13, 2019

After going a couple rounds with wheels, we've evolved our procedure to always upload wheels before sdist. Before we changed, we had more than one unlucky person install Numba during the time when we are releasing, and get stuck trying to compile Numba from scratch. :)

@jvesely
Copy link
Contributor

jvesely commented Mar 14, 2019

wheels for llvmlite-0.28/python 3.5 are available on pypi. should this be closed?
https://pypi.org/project/llvmlite/#files

@seibert
Copy link
Contributor

seibert commented Mar 14, 2019

Closing since Python 3.5 wheels for the latest release are now available.

@seibert seibert closed this as completed Mar 14, 2019
@eric-wieser
Copy link

eric-wieser commented May 20, 2020

Note that this problem has resurfaced again, 0.32.0 and 0.32.1 have no Python 3.5 artifacts: https://pypi.org/project/llvmlite/0.32.0/#files.

I've taken to using pip install --prefer-binary to avoid this causing problems, but it would be good to publish those wheels anyway.

@esc
Copy link
Member

esc commented May 20, 2020

@eric-wieser thanks for asking about this. I believe that Python 3.5 is no longer supported and hence there are now no wheels for it: #551

@eric-wieser
Copy link

Not according to this line:

"Programming Language :: Python :: 3.5",

There's no python_requires either.

@eric-wieser
Copy link

Ah, it looks like the 3.5 classifier was an error in the 0.32.0 release that was caught in time for 0.32.1.

However, only python_requires is actually respected by pip.

@esc
Copy link
Member

esc commented May 21, 2020

@eric-wieser thanks for catching this. We updated the README too here: https://github.com/numba/numba/blob/master/README.rst -- thanks for catching the missing python_requires!

@esc
Copy link
Member

esc commented May 21, 2020

@eric-wieser I have created a PR to remedy this situation here: #590

Thanks again for your feedback, it is much appreciated.

@astrojuanlu
Copy link

The problem with forgetting python_requires is that even if you fix it in a future release, the old one stays on PyPI causing trouble. I've fell in this trap myself many times, and reported it in other high profile projects :( Hopefully with PEP 592) this will be easier to control, but at the moment I think the only solution is to either accept the situation, or remove the release.

@eric-wieser
Copy link

or remove the release.

I think a way to resolve this might be to use post-releases:

  • Remove the 0.32.0 release, and create a 0.32.0.post1 release with the fix
  • Remove the 0.32.1 release, and create a 0.32.1.post1 release with the fix
  • ... etc

@ghost
Copy link

ghost commented Jun 10, 2020

So quick question, if I'm getting the error from the start of this issue chain, what should I do? I've tried every version that has been mentioned to work for Python 3.5 and nothing works, always getting this error message:

Failed building wheel for llvmlite
  Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: llvmlite
  Running setup.py install for llvmlite ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3cpvx1mp/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-ss0cf8xk-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    got version from file /tmp/pip-build-3cpvx1mp/llvmlite/llvmlite/_version.py {'full': 'aa11b129c0b55973067422397821ae6d44fa5e70', 'version': '0.32.1'}
    running build_ext
    /usr/bin/python3 /tmp/pip-build-3cpvx1mp/llvmlite/ffi/build.py
    LLVM version... Traceback (most recent call last):
      File "/tmp/pip-build-3cpvx1mp/llvmlite/ffi/build.py", line 106, in main_posix
        out = subprocess.check_output([llvm_config, '--version'])
      File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
        **kwargs).stdout
      File "/usr/lib/python3.5/subprocess.py", line 383, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
        restore_signals, start_new_session)
      File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
        raise child_exception_type(errno_num, err_msg)
    FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/tmp/pip-build-3cpvx1mp/llvmlite/ffi/build.py", line 192, in <module>
        main()
      File "/tmp/pip-build-3cpvx1mp/llvmlite/ffi/build.py", line 182, in main
        main_posix('linux', '.so')
      File "/tmp/pip-build-3cpvx1mp/llvmlite/ffi/build.py", line 109, in main_posix
        "to the path for llvm-config" % (llvm_config,))
    RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
    error: command '/usr/bin/python3' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3cpvx1mp/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-ss0cf8xk-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-3cpvx1mp/llvmlite/

Can anyone help?

@astrojuanlu
Copy link

@JckJhns Please try pip install llvmlite --prefer-binary

@ghost
Copy link

ghost commented Jun 15, 2020

@astrojuanlu Hi, it just gives an error saying that there is no such option as --prefer-binary. Any suggestions?

@astrojuanlu
Copy link

@Jack-Johns upgrade pip :)

@ghost
Copy link

ghost commented Jun 15, 2020

I've upgraded pip to 20.1.1 yet it still fails to find the llvm-config file...

@eric-wieser
Copy link

@Jack-Johns: Are you using --prefer-binary now that you upgraded pip?

@ghost
Copy link

ghost commented Jun 15, 2020

@eric-wieser yep after upgrading I used the recommended command and it didn't work. Error log is as follows:

$ pip3 install llvmlite --prefer-binary
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting llvmlite
  Using cached llvmlite-0.32.1.tar.gz (104 kB)
Building wheels for collected packages: llvmlite
  Building wheel for llvmlite (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ur4c79j5/llvmlite/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ur4c79j5/llvmlite/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-8k6r2ti6
       cwd: /tmp/pip-install-ur4c79j5/llvmlite/
  Complete output (26 lines):
  running bdist_wheel
  /usr/bin/python3 /tmp/pip-install-ur4c79j5/llvmlite/ffi/build.py
  LLVM version... Traceback (most recent call last):
    File "/tmp/pip-install-ur4c79j5/llvmlite/ffi/build.py", line 106, in main_posix
      out = subprocess.check_output([llvm_config, '--version'])
    File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
      **kwargs).stdout
    File "/usr/lib/python3.5/subprocess.py", line 383, in run
      with Popen(*popenargs, **kwargs) as process:
    File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
      restore_signals, start_new_session)
    File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
      raise child_exception_type(errno_num, err_msg)
  FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/tmp/pip-install-ur4c79j5/llvmlite/ffi/build.py", line 192, in <module>
      main()
    File "/tmp/pip-install-ur4c79j5/llvmlite/ffi/build.py", line 182, in main
      main_posix('linux', '.so')
    File "/tmp/pip-install-ur4c79j5/llvmlite/ffi/build.py", line 109, in main_posix
      "to the path for llvm-config" % (llvm_config,))
  RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
  error: command '/usr/bin/python3' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for llvmlite
  Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: llvmlite
    Running setup.py install for llvmlite ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ur4c79j5/llvmlite/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ur4c79j5/llvmlite/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-j5wkovf8/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/miro/.local/include/python3.5m/llvmlite
         cwd: /tmp/pip-install-ur4c79j5/llvmlite/
    Complete output (29 lines):
    running install
    running build
    got version from file /tmp/pip-install-ur4c79j5/llvmlite/llvmlite/_version.py {'full': 'aa11b129c0b55973067422397821ae6d44fa5e70', 'version': '0.32.1'}
    running build_ext
    /usr/bin/python3 /tmp/pip-install-ur4c79j5/llvmlite/ffi/build.py
    LLVM version... Traceback (most recent call last):
      File "/tmp/pip-install-ur4c79j5/llvmlite/ffi/build.py", line 106, in main_posix
        out = subprocess.check_output([llvm_config, '--version'])
      File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
        **kwargs).stdout
      File "/usr/lib/python3.5/subprocess.py", line 383, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
        restore_signals, start_new_session)
      File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
        raise child_exception_type(errno_num, err_msg)
    FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/tmp/pip-install-ur4c79j5/llvmlite/ffi/build.py", line 192, in <module>
        main()
      File "/tmp/pip-install-ur4c79j5/llvmlite/ffi/build.py", line 182, in main
        main_posix('linux', '.so')
      File "/tmp/pip-install-ur4c79j5/llvmlite/ffi/build.py", line 109, in main_posix
        "to the path for llvm-config" % (llvm_config,))
    RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
    error: command '/usr/bin/python3' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ur4c79j5/llvmlite/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ur4c79j5/llvmlite/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-j5wkovf8/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/miro/.local/include/python3.5m/llvmlite Check the logs for full command output.

@astrojuanlu
Copy link

I see a mention to https://www.piwheels.org/simple, so I suspect you are on a Raspberry Pi. Wheels of packages that are not pure Python are platform-dependent, please check out piwheels/packages#33, which in turns depends on #314.

You will need to install llvm with your system package manager before trying to pip install llvmlite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants