All my Python development has been in Jupyter Notebooks, though I need an integration for my new Darfon solar inverter, so I’m pitching in to make one. I am following the procedure to set up the dev environment from the documentation, and have hit a snag;
Current development environment is Ubuntu Studio 18.04 20.04
I installed the core Linux dependencies without a hitch or error (had set it up earlier, but reran it just to capture the output to show here)
will@will-G5-5590:~/core$ sudo apt-get install python3-pip python3-dev python3-venv autoconf libssl-dev libxml2-dev libxslt1-dev libjpeg-dev libffi-dev libudev-dev zlib1g-dev pkg-config libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libavresample-dev libavfilter-dev ffmpeg
Reading package lists… Done
Building dependency tree
Reading state information… Done
autoconf is already the newest version (2.69-11.1).
libffi-dev is already the newest version (3.3-4).
libjpeg-dev is already the newest version (8c-2ubuntu8).
pkg-config is already the newest version (0.29.1-0ubuntu4).
python3-dev is already the newest version (3.8.2-0ubuntu2).
python3-venv is already the newest version (3.8.2-0ubuntu2).
libssl-dev is already the newest version (1.1.1f-1ubuntu2.16).
libudev-dev is already the newest version (245.4-4ubuntu3.19).
libxml2-dev is already the newest version (2.9.10+dfsg-5ubuntu0.20.04.5).
libxslt1-dev is already the newest version (1.1.34-4ubuntu0.20.04.1).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu1.5).
ffmpeg is already the newest version (7:4.2.7-0ubuntu0.1).
libavcodec-dev is already the newest version (7:4.2.7-0ubuntu0.1).
libavdevice-dev is already the newest version (7:4.2.7-0ubuntu0.1).
libavfilter-dev is already the newest version (7:4.2.7-0ubuntu0.1).
libavformat-dev is already the newest version (7:4.2.7-0ubuntu0.1).
libavresample-dev is already the newest version (7:4.2.7-0ubuntu0.1).
libavutil-dev is already the newest version (7:4.2.7-0ubuntu0.1).
libswscale-dev is already the newest version (7:4.2.7-0ubuntu0.1).
python3-pip is already the newest version (20.0.2-5ubuntu1.6).
The following packages were automatically installed and are no longer required:
libfwupdplugin1 libllvm11 libllvm11:i386 shim
Use ‘sudo apt autoremove’ to remove them.
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
I set up the local repository without a htich;
will@will-G5-5590:~$ git clone GitHub - skyemoor/core: 🏡 Open source home automation that puts local control and privacy first.
Cloning into ‘core’…
remote: Enumerating objects: 714880, done.
remote: Counting objects: 100% (1050/1050), done.
remote: Compressing objects: 100% (799/799), done.
remote: Total 714880 (delta 275), reused 994 (delta 250), pack-reused 713830
Receiving objects: 100% (714880/714880), 404.47 MiB | 1.22 MiB/s, done.
Resolving deltas: 100% (511441/511441), done.
Updating files: 100% (30297/30297), done.
will@will-G5-5590:~$ cd core
will@will-G5-5590:~/core$ git remote add upstream GitHub - home-assistant/core: 🏡 Open source home automation that puts local control and privacy first.
Running the setup script was where the problem arose;
will@will-G5-5590:~/core$ script/setup
Copy ./.vscode/settings.default.json to ./.vscode/settings.json.
Installing development dependencies…
Collecting wheel
Downloading wheel-0.38.4-py3-none-any.whl (36 kB)
Installing collected packages: wheel
Successfully installed wheel-0.38.4Usage:
/home/will/core/venv/bin/python3 -m pip install [options] [package-index-options] …
/home/will/core/venv/bin/python3 -m pip install [options] -r [package-index-options] …
/home/will/core/venv/bin/python3 -m pip install [options] [-e] …
/home/will/core/venv/bin/python3 -m pip install [options] [-e] …
/home/will/core/venv/bin/python3 -m pip install [options] <archive url/path> …no such option: --use-deprecated
This appears to be the point where the problem occurred. In the setup script, this line of code is;
python3 -m pip install -e . --constraint homeassistant/package_constraints.txt --use-deprecated=legacy-resolverT
I carried on just to see if this would still work, and ran the venv command, though the following command came back “file not found”
hass -c config
Sure enough, a search of the entire core subdirectories showed no “hass” file of any kind, not surprising as that was to be installed in the line that failed in the setup script.
I followed everything to a T, though the script seems to have a line that cannot be executed. Is there anything I need to correct in the setup script, or did I make a mistake (the latter of which I admit is the most likely)?