Unable to install

You are right. Pip3 command doesn’t work. Use pip instead.
First you should check whether you have python3 installed.
Use pip and watch if all goes well. If not check what library gives you problems and let me know
Are you familiar with virtualenv?

Were you able to get this resolved? I’m coming up with the same exact error. I followed the same video instructions for Windows 10.

You can run:python3 -m ensurepip to ensure that pip3 gets installed properly. If you have both python2 & 3, then pip will typically install into python2.

Hi,

Sorry, not meaning to hijack your case.
I am experiencing the same issues I think.

Tried installing this on Windows 2012 server and Windows 10 with same issues.
Followd the guide on the HomeAssistant home page and the Youtube video, without any luck.

Please see my error message.

C:\Windows\system32>python -m homeassistant --open-ui
Traceback (most recent call last):
  File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\lib\site-packages\homeassistant\__main__.py", line 12, in <
odule>
    from homeassistant import bootstrap
  File "C:\Python27\lib\site-packages\homeassistant\bootstrap.py", line 19, in
module>
    import homeassistant.core as core
  File "C:\Python27\lib\site-packages\homeassistant\core.py", line 13, in <modu
e>
    from types import MappingProxyType
ImportError: cannot import name MappingProxyType

I ended up creating a VM in Hyper-V with Ubuntu.
Worked will after install.

[quote=“alfjonny”]Hi,

Sorry, not meaning to hijack your case.
I am experiencing the same issues I think.

Tried installing this on Windows 2012 server and Windows 10 with same issues.
Followd the guide on the HomeAssistant home page and the Youtube video, without any luck.

Please see my error message.

C:\Windows\system32>python -m homeassistant --open-ui
Traceback (most recent call last):
File “C:\Python27\lib\runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “C:\Python27\lib\runpy.py”, line 72, in run_code
exec code in run_globals
File "C:\Python27\lib\site-packages\homeassistant_main
.py", line 12, in <
odule>
from homeassistant import bootstrap
File “C:\Python27\lib\site-packages\homeassistant\bootstrap.py”, line 19, in
module>
import homeassistant.core as core
File “C:\Python27\lib\site-packages\homeassistant\core.py”, line 13, in
from types import MappingProxyType
ImportError: cannot import name MappingProxyType[/quote]

Hmm… Tried this on Windows 10 myself. If I have time, I might try created a VM to check out this software.

You’re also using Python 2.7 instead of the required Python 3.5

[quote=“alfjonny”]Hi,

Sorry, not meaning to hijack your case.
I am experiencing the same issues I think.

Tried installing this on Windows 2012 server and Windows 10 with same issues.
Followd the guide on the HomeAssistant home page and the Youtube video, without any luck.

Please see my error message.

C:\Windows\system32>python -m homeassistant --open-ui
Traceback (most recent call last):
File “C:\Python27\lib\runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “C:\Python27\lib\runpy.py”, line 72, in run_code
exec code in run_globals
File "C:\Python27\lib\site-packages\homeassistant_main
.py", line 12, in <
odule>
from homeassistant import bootstrap
File “C:\Python27\lib\site-packages\homeassistant\bootstrap.py”, line 19, in
module>
import homeassistant.core as core
File “C:\Python27\lib\site-packages\homeassistant\core.py”, line 13, in
from types import MappingProxyType
ImportError: cannot import name MappingProxyType[/quote]

You’re on Python 2.7
You need Python 3.4 or higher

[quote=“sanders”][quote=“alfjonny”]Hi,

Sorry, not meaning to hijack your case.
I am experiencing the same issues I think.

Tried installing this on Windows 2012 server and Windows 10 with same issues.
Followd the guide on the HomeAssistant home page and the Youtube video, without any luck.

Please see my error message.

C:\Windows\system32>python -m homeassistant --open-ui
Traceback (most recent call last):
File “C:\Python27\lib\runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “C:\Python27\lib\runpy.py”, line 72, in run_code
exec code in run_globals
File "C:\Python27\lib\site-packages\homeassistant_main
.py", line 12, in <
odule>
from homeassistant import bootstrap
File “C:\Python27\lib\site-packages\homeassistant\bootstrap.py”, line 19, in
module>
import homeassistant.core as core
File “C:\Python27\lib\site-packages\homeassistant\core.py”, line 13, in
from types import MappingProxyType
ImportError: cannot import name MappingProxyType[/quote]

You’re on Python 2.7
You need Python 3.4 or higher[/quote]

I’m running Python 3.5.1 and it is still failing on Windows 10.

Best bet is to start over. If you aren’t using it for anything else, completely remove any instances of Python on your machine (uninstall, delete folders, etc). The fact that it is referencing “C:\Python27…” means that it is trying to use version 2.7 most likely.

This is exceedingly frustrating.

Just did an install on a clean win10 machine. Hope this helps:

install python 3.5 (make sure the path is added. Mark the checkbox !)

execute: python -m venv hass (when in your user folder for example)
goto hass/scripts

execute: activate (You have now activated the hass virtual environment.)
execute: pip install homeassistant (Watch for any errors to come by. I didn’t see any.)
execute: hass (Hass will start and try to install additional packages.)

By default it will try to install netdisco. This will result in an error. You need the netifaces package installed.

download the .whl file from here. (I downloaded the 32 bit version.)
lfd.uci.edu/~gohlke/pythonlibs/#netifaces

execute: (type in the command prompt)
pip install

pip install netdisco (just to be sure.)

hass (It could fail with a json error. A restart of hass did solve this.)

[quote=“sanders”]Just did an install on a clean win10 machine. Hope this helps:

install python 3.5 (make sure the path is added. Mark the checkbox !)

execute: python -m venv hass (when in your user folder for example)
goto hass/scripts

execute: activate (You have now activated the hass virtual environment.)
execute: pip install homeassistant (Watch for any errors to come by. I didn’t see any.)
execute: hass (Hass will start and try to install additional packages.)

By default it will try to install netdisco. This will result in an error. You need the netifaces package installed.

download the .whl file from here. (I downloaded the 32 bit version.)
lfd.uci.edu/~gohlke/pythonlibs/#netifaces

execute: (type in the command prompt)
pip install

pip install netdisco (just to be sure.)

hass (It could fail with a json error. A restart of hass did solve this.)[/quote]

Excellent! I’m in business.

@Alfjonny you seem to be using Python 2.7. Home Assistant requires at least Python 3.4

In case anybody stumbles upon this because of this issue, I was able to solve it by running
hass
rather than
py -m homeassistant

Hey guys, I hate to revive and old topic, but I’m having this same issue

Was able to do all the steps @sanders stated except running HASS. I get this error:

C:\Python34>hass
Traceback (most recent call last):
File “c:\python34\lib\runpy.py”, line 193, in run_module_as_main
main”, mod_spec)
File “c:\python34\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "C:\Python34\Scripts\hass.exe_main
.py", line 9, in
File "c:\python34\lib\site-packages\homeassistant_main
.py", line 359, in main
monkey_patch_asyncio()
File “c:\python34\lib\site-packages\homeassistant_main_.py”, line 58, in monkey_patch_asyncio
asyncio.tasks.Task._all_tasks = IgnoreCalls()
TypeError: can’t set attributes of built-in/extension type ‘_asyncio.Task’

1 Like

HI Dominique,

Were u able to go past this issue?
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.6/bin/hass”, line 11, in
sys.exit(main())
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/main.py”, line 359, in main
monkey_patch_asyncio()
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/main.py”, line 58, in monkey_patch_asyncio
asyncio.tasks.Task._all_tasks = IgnoreCalls()
TypeError: can’t set attributes of built-in/extension type ‘_asyncio.Task’

i did a clean install of python3 and HA (on macos sierra), but i also get the error mentioned above. what i did to be able to start hass was to uncomment line 58 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/__main__.py

this way HA starts up fine.

i know it’s not the right way, but a strong indication that it’s not a faulty python3 install, but rather an HA (or monkey-patch) incompatibility in certain environments (macos, windows?).

1 Like

Hi @diplix, thanks for pointing this out.

@rookie57 Maybe this also helps you.

I have installed python 3.6.0 and looks like the supposed bug in pyhton 3.6 has been solved. So, I just commented out line 359 like this:
###BF monkey_patch_asyncio()
To remove that patch, as suggested on that file comments:

“On Python 3.6, after the bug is fixed, this monkey-patch can be disabled.”

1 Like

Thanks guys! this solved my issues too!