Search code examples
pythonpython-3.xpipmoduleclickhouse

Unable to compile C extensions for clickhouse-connect python module


Unexpectedly stuck on installation of python module clickhouse-connect, with this error:

Building wheels for collected packages: clickhouse-connect
  Running setup.py bdist_wheel for clickhouse-connect ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-4fl5kcjv/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-o14i2v_m --python-tag cp37:
  Using Cython 3.0.0b1to build cython modules
  Unable to compile C extensions for faster performance due to usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
  
  error: invalid command 'bdist_wheel', will use pure Python
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help

And absolutely no ideas :(

Details:

  • Python 3.7.3 (default, Oct 31 2022, 14:04:00) [GCC 8.3.0] on linux
  • pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)
  • cython, wheel, python3-dev - installed.
  • clickhouse-connect using pure Python installed successfully.

I have tried to build module from sources (github), but again, no luck.


Solution

  • As @MattDMo posted in comments, i have outdated pip.

    python3 -m pip install --upgrade pip
    

    Solved the problem.