ModuleNotFound skbuild

I have the following error while doing this command on Linux : pip3 install cmake --upgrade.

Collecting cmake
  Using cached https://files.pythonhosted.org/packages/a5/7c/6525cadf99abbabbcb29676f53de0441e8d2f8d0114ab52aae2b31223a3b/cmake-3.16.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-lgui9mlv/cmake/setup.py", line 7, in <module>
        from skbuild import setup
    ModuleNotFoundError: No module named 'skbuild'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-lgui9mlv/cmake/ 

How can I solve this ?

It appears as though a build dependency is missing? @jcfr

I tried to force it to different versions with
pip3 install 'cmake==3.1x.x' --upgrade

And I have this error only with the version 3.16.3, the one taken by default with --upgrade parameter.
Also, I don’t have this error on Mac, only on Debian.

Which python version are you using ?

I am using Python 3.7.3

Here is what is happening:

docker run -ti --rm debian:buster

# then from within container
apt update
apt install python3-pip
python3 -c "from pip._internal.pep425tags import get_supported; print('\n'.join('-'.join(x) for x in get_supported()))"

cp37-cp37m-manylinux1_x86_64
cp37-cp37m-linux_x86_64
cp37-abi3-manylinux1_x86_64
cp37-abi3-linux_x86_64
cp37-none-manylinux1_x86_64
cp37-none-linux_x86_64
cp36-abi3-manylinux1_x86_64
cp36-abi3-linux_x86_64
cp35-abi3-manylinux1_x86_64
cp35-abi3-linux_x86_64
cp34-abi3-manylinux1_x86_64
cp34-abi3-linux_x86_64
cp33-abi3-manylinux1_x86_64
cp33-abi3-linux_x86_64
cp32-abi3-manylinux1_x86_64
cp32-abi3-linux_x86_64
py3-none-manylinux1_x86_64
py3-none-linux_x86_64
cp37-none-any
cp3-none-any
py37-none-any
py3-none-any
py36-none-any
py35-none-any
py34-none-any
py33-none-any
py32-none-any
py31-none-any
py30-none-any

Until scikit-build/cmake-python-distributions#78 is addressed, you will not be able to install recent CMake wheels.

Note that building cmake using the source distributions is not something we support. I will probably look into removing the sdist (source distribution) from pypi completely.