Question: Consider the usual scenario - I want to create a virtual environment and install some packages. Say python3 -m venv venv source venv/bin/activate pip install databricks-cli  During the installation, I get an error Building wheels for collected packages: databricks-cli Building wheel for databricks-cli (setup.py) ... error ERROR: Command errored out with exit status 1: command: /home/paulius/Documents/wheeltest/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-m7jmyh1m/databricks-cli/setup.py'"'"'; __file__='"'"'/tmp/pip-install-m7jmyh1m/databricks-cli/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-maxix98x cwd: /tmp/pip-install-m7jmyh1m/databricks-cli/ Complete output (8 lines): /tmp/pip-install-m7jmyh1m/databricks-cli/setup.py:24: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: invalid command 'bdist_wheel' ---------------------------------------- ERROR: Failed building wheel for databricks-cli  While it is benign (the installation actually works), it is still annoying. I know that pip install wheel resolves this, but wheel does not come with the virtual environment by default. So should I always add it to my requirements.txt, or maybe this is something that can be solved by the package maintainer (in this case databricks-cli) and hence I should open an issue in their Github?  Update: note that the wheel is not necessary to install wheels, in this example bunch of dependencies get successfully downloaded and installed as wheels. The only databricks-cli package gets the error, as it does not have a wheel, but for some reason, pip tries to build it.

Answer: This was a pip bug, and the solution is to upgrade the pip. With the newest version things look fine: (venv) paulius@xps:~/Documents/wheeltest$ pip install databricks-cli Collecting databricks-cli Using cached databricks-cli-0.14.3.tar.gz (54 kB) Collecting click>=6.7 Using cached click-8.0.1-py3-none-any.whl (97 kB) Collecting requests>=2.17.3 Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB) Collecting six>=1.10.0 Using cached six-1.16.0-py2.py3-none-any.whl (11 kB) Collecting tabulate>=0.7.7 Using cached tabulate-0.8.9-py3-none-any.whl (25 kB) Collecting idna<4,>=2.5 Using cached idna-3.2-py3-none-any.whl (59 kB) Collecting certifi>=2017.4.17 Using cached certifi-2021.5.30-py2.py3-none-any.whl (145 kB) Collecting urllib3<1.27,>=1.21.1 Using cached urllib3-1.26.6-py2.py3-none-any.whl (138 kB) Collecting charset-normalizer~=2.0.0 Using cached charset_normalizer-2.0.1-py3-none-any.whl (35 kB) Using legacy 'setup.py install' for databricks-cli, since package 'wheel' is not installed. Installing collected packages: urllib3, idna, charset-normalizer, certifi, tabulate, six, requests, click, databricks-cli Running setup.py install for databricks-cli ... done Successfully installed certifi-2021.5.30 charset-normalizer-2.0.1 click-8.0.1 databricks-cli-0.14.3 idna-3.2 requests-2.26.0 six-1.16.0 tabulate-0.8.9 urllib3-1.26.6  Note the Using legacy 'setup.py install' ... line. This is a related issue in the pip github https://github.com/pypa/pip/issues/8302. Not exactly that, but there is an explanation in the comments on what's the wheel building logic supposed to by.