How to add the Home assistant folder to my path in Windows?

Hi after some fuzzing around and having to install Python and Microsoft C++ development tools, I finally got Home Assistant to install cleanly (as in without errors). Except that is for this final warning.

WARNING: The script hass.exe is installed in 'C:\Users\~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

I’m really sorry and I did search the forum for the full warning, but my search came up blank, but how do I do what it’s asking me to do? In Other words, how do I add hass.exe to my path like it wants me to do?

I did mess about with Linux a lot several years ago, but I have since forgotten almost everything. I know this is windows and this is different, but I’m guessing the solution is really simple? Basically somehow I just need to add this executable to my path so that python can find it?

Of course when I try to run Home assistant with the command py -m homeassistant --open-ui python can’t find it. I’ve tried variations on this command, like removing the extra -.
But with the same result.

\AppData\Local\Programs\Python\Python38\python.exe: No module named homeassistant

Sorry for the total n00b question. Please be patient and gentle with me.

Edit I found the executable mentioned in the error and tried to run it (double click) and it just spat out a whole bunch of other errors, as in:

Unable to find configuration. Creating default one in C:\Users\George\AppData\Roaming\.homeassistant
2020-09-24 20:31:12 ERROR (MainThread) [homeassistant.setup] Setup failed for recorder: Unable to import component: No module named 'sqlalchemy'
2020-09-24 20:31:20 ERROR (MainThread) [homeassistant.setup] Error during setup of component http
Traceback (most recent call last):
  File "C:\Users\George\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\homeassistant\setup.py", line 213, in _async_setup_component
    result = await task
  File "C:\Users\George\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\homeassistant\components\http\__init__.py", line 209, in async_setup
    server = HomeAssistantHTTP(
  File "C:\Users\George\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\homeassistant\components\http\__init__.py", line 312, in __init__
    setup_cors(app, cors_origins)
  File "C:\Users\George\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\homeassistant\components\http\cors.py", line 26, in setup_cors
    import aiohttp_cors
ModuleNotFoundError: No module named 'aiohttp_cors'
2020-09-24 20:31:20 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of system_log. Setup failed for dependencies: http
2020-09-24 20:31:20 ERROR (MainThread) [homeassistant.setup] Setup failed for system_log: Could not set up all dependencies.
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of alexa. Setup failed for dependencies: http
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Setup failed for alexa: Could not set up all dependencies.
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of websocket_api. Setup failed for dependencies: http
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Setup failed for websocket_api: Could not set up all dependencies.
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of api. Setup failed for dependencies: http
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Setup failed for api: Could not set up all dependencies.
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of config. Setup failed for dependencies: http
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Setup failed for config: Could not set up all dependencies.
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of webhook. Setup failed for dependencies: http
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Setup failed for webhook: Could not set up all dependencies.
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of image. Setup failed for dependencies: http
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Setup failed for image: Could not set up all dependencies.
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of auth. Setup failed for dependencies: http
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Setup failed for auth: Could not set up all dependencies.
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of search. Setup failed for dependencies: websocket_api
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Setup failed for search: Could not set up all dependencies.
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of cloud. Setup failed for dependencies: http, webhook, alexa
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Setup failed for cloud: Could not set up all dependencies.
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of person. Setup failed for dependencies: image
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Setup failed for person: Could not set up all dependencies.
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of onboarding. Setup failed for dependencies: auth, http, person
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Setup failed for onboarding: Could not set up all dependencies.
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of frontend. Setup failed for dependencies: api, auth, config, http, onboarding, search, system_log, websocket_api
2020-09-24 20:31:21 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Could not set up all dependencies.
2020-09-24 20:31:26 ERROR (MainThread) [homeassistant.setup] Setup failed for updater: Unable to import component: No module named 'distro'
2020-09-24 20:31:26 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of media_source. Setup failed for dependencies: http
2020-09-24 20:31:26 ERROR (MainThread) [homeassistant.setup] Setup failed for media_source: Could not set up all dependencies.
2020-09-24 20:31:26 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of system_health. Setup failed for dependencies: http
2020-09-24 20:31:26 ERROR (MainThread) [homeassistant.setup] Setup failed for system_health: Could not set up all dependencies.
2020-09-24 20:31:26 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of map. Setup failed for dependencies: frontend
2020-09-24 20:31:26 ERROR (MainThread) [homeassistant.setup] Setup failed for map: Could not set up all dependencies.
2020-09-24 20:31:26 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of zeroconf. Setup failed for dependencies: api
2020-09-24 20:31:26 ERROR (MainThread) [homeassistant.setup] Setup failed for zeroconf: Could not set up all dependencies.
2020-09-24 20:31:26 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of history. Setup failed for dependencies: http, recorder
2020-09-24 20:31:26 ERROR (MainThread) [homeassistant.setup] Setup failed for history: Could not set up all dependencies.
2020-09-24 20:31:26 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of tts. Setup failed for dependencies: http
2020-09-24 20:31:26 ERROR (MainThread) [homeassistant.setup] Setup failed for tts: Could not set up all dependencies.
2020-09-24 20:31:26 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of logbook. Setup failed for dependencies: frontend, http, recorder
2020-09-24 20:31:26 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Could not set up all dependencies.
2020-09-24 20:31:34 ERROR (MainThread) [homeassistant.setup] Setup failed for ssdp: Unable to import component: No module named 'defusedxml'

Please wrap logs, code and configs to make it readable.

You can click this button
image
and paste logs there, or place a triple back-tick (```) before and after the code/logs.

Try this link.

A point where it says “Either system or user PATH” I reckon just go System PATH.
When it tells you to paste, just paste this:

C:\Users~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts

I did this. Now when I run the script I just get a blank screen with a blinking cursor. (Double click.) Nothing else. I’ll fix the code in the morning.

OK, code fixed. Have any of you guys got any idea what’s going on here?

I heard HS was fantastic and the community were second to none. I’m a little disappointed at the lack of response to my query. Is it because I’m using Windows? I have a spare Windows Mini PC - and beyond monitoring a single security camera, it doesn’t do an awful lot else. I can’t change it to Linux because the software I use for my camera is proprietary (and works really well - so why mess with it?). But it may as well be doing double duty with HS as well, as it doesn’t take up much resources currently. Please can you guys assist?

The fact is : not many people use HA on Windows. It is hard to answer a question if you don’t know the answer yourself.

This might be correct. HA does not have a desktop user interface, so I suspect you don’t see anything. If that screen is showing, did you try to access http://IP:8123 in a browser ? IP = the IP address of that windows computer.

I get not many people run windows for HA, but as I said, that computer will hopefully be doing double duty, both as a home security camera platform and as a HA machine. But I don’t think I was clear. I got those masses of errors above when trying to run the HA GUI. I forget the command off the top of my head, but there is a web based GUI. (Supposedly). I try to run this and then just the blinking empty cursor.

I’m not sure if this is worth bumping? I forgot how much Linux guys really loath Windows, even when it’s the only really practical option.

So I run HA on Windows, and I’ll say this… it works, but there’s a fair amount of manually installing dependencies and such that make it less than ideal.

It’s been a while since I’ve done a clean install on Windows, but looking at the errors I’m wondering if there’s a permissions error or something like that going on. When I installed python I tried to keep it real simple and installed it in C:\Python, then set up a python virtualenv and installed everything in C:\Python\home-assistant using pip. From there I think I was just able to run the hass executable from the command prompt. Sorry this might not be super helpful, like I said it’s been a while.