developers.home-assistant
developers.home-assistant copied to clipboard
Problems with bdist_wheel when following HA Dev guide
When building the development environment using https://developers.home-assistant.io/docs/development_environment/#setting-up-virtual-environment
Building wheels for collected packages: pyyaml, distlib
Running setup.py bdist_wheel for pyyaml ... error
Complete output from command /mnt/c/Users/daz/core/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-b0wxy1w6/pyyaml/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-gx4luy4z --python-tag cp37:
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'
Forum post Problems with bdist_wheel when following HA Dev guide
This can be fixed by
Clean old Python virtual env
From inside core directory.
rm -Rv venv
Build new virtual env
python3.7 -m venv venv
source venv/bin/activate
pip3 install wheel
Continue dev guide
Now this step below runs without error
script/setup
The above fix feel more like a workaround rather than a proper fix. I can submit a PR to update the documentation but I'd prefer to know if the above comment is the correct way to fix it and not a workaround.
It looks like that this issue is limited to certain operating systems/platforms. I don't have wheel
present in my venv
(on x86_64) and script/setup
runs fine.
This was when running in WSL (Ubuntu) on windows 10. I did a fresh build and setup as per the Developing on windows guide.
I can reproduce this running Ubuntu 20.04 on WSL2.