Installation in Ubuntu 18.04

Not sure if applies but did you do this before installation
(If you’re on a Debian based system, you will need to install Python virtual environment support using apt-get install python3-pip python3-venv.)

It’s in the virtual env initial instruction

homeassistant@HASS:/$ sudo apt install python3-pip python3-venv
[sudo] password for homeassistant:
Reading package lists… Done
Building dependency tree
Reading state information… Done
python3-pip is already the newest version (9.0.1-2).
python3-venv is already the newest version (3.6.4-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

And then these instructions https://home-assistant.io/docs/installation/raspberry-pi/

Created the virtual environment etc,etc.?

Don’t know more, but that’s the process I used for my install on Ubuntu 17.10 and had no issues

Yes, I followed the directions to the T! No dice :frowning:

Did you activate virtual environment? cd to virt env folder and

source bin/activate

Once you activate environment prompt will change to

(homeassistant) homeassistant@HASS

And i don’t see that in your logs.

I did,

homeassistant@HASS:/srv$ cd /srv/homeassistant
homeassistant@HASS:/srv/homeassistant$ python3 -m venv .
homeassistant@HASS:/srv/homeassistant$ source bin/activate
(homeassistant) homeassistant@HASS:/srv/homeassistant$ python3 -m pip install whee l
Collecting wheel
Exception:
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/pip/basecommand.py”, line 2 15, in main
status = self.run(options, args)
File “/srv/homeassistant/lib/python3.6/site-packages/pip/commands/install.py”, l ine 353, in run
wb.build(autobuilding=True)
File “/srv/homeassistant/lib/python3.6/site-packages/pip/wheel.py”, line 749, in build
self.requirement_set.prepare_files(self.finder)
File “/srv/homeassistant/lib/python3.6/site-packages/pip/req/req_set.py”, line 3 80, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File “/srv/homeassistant/lib/python3.6/site-packages/pip/req/req_set.py”, line 5 54, in _prepare_file
require_hashes
File “/srv/homeassistant/lib/python3.6/site-packages/pip/req/req_install.py”, li ne 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File “/srv/homeassistant/lib/python3.6/site-packages/pip/index.py”, line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File “/srv/homeassistant/lib/python3.6/site-packages/pip/index.py”, line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File “/srv/homeassistant/lib/python3.6/site-packages/pip/index.py”, line 568, in _get_pages
page = self._get_page(location)
File “/srv/homeassistant/lib/python3.6/site-packages/pip/index.py”, line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File “/srv/homeassistant/lib/python3.6/site-packages/pip/index.py”, line 811, in get_page
inst = cls(resp.content, resp.url, resp.headers)
File “/srv/homeassistant/lib/python3.6/site-packages/pip/index.py”, line 731, in init
namespaceHTMLElements=False,
TypeError: parse() got an unexpected keyword argument ‘transport_encoding’
(homeassistant) homeassistant@HASS:/srv/homeassistant$ exit

Since I see wheel in pip packages I then try homeassistant and to no avail. The same error as above.

Try to upgrade pip

python3 -m pip install --upgrade pip

I have been able to successfully install by doing the following.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install docker.io
sudo apt-get install socat
sudo apt-get install jq
sudo su -
curl -sL https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install | bash -s

Though I’m not sure if this is a long term way to do it and/or if I’ll have issues when I need to update or make serious changes.

homeassistant@HASS:/$ python3 -m pip install --upgrade pip
Collecting pip
From cffi callback <function _verify_callback at 0x7fbf393a22f0>:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/OpenSSL/SSL.py”, line 313, in wrapper
_lib.X509_up_ref(x509)
AttributeError: module ‘lib’ has no attribute ‘X509_up_ref’
Could not find a version that satisfies the requirement pip (from versions: )
No matching distribution found for pip

I never had any problem with installing in virtual env. That has to be ubuntu 18.04 problem.

One last try. Did you install python3-dev?

Yes, I’ve tried every way. Only way its worked is the above method I posted.

From what I can see, Ubuntu 18.04 is still a development version. It wouldn’t surprise me in the least if there are missing packages for it.

The installation works fine on 17.10, why do need Ubuntu 18.04?

I’ve try to install hass on ubuntu server 18.04 just for fun. And it worked without any problems.

Could this be the issue? https://bugs.launchpad.net/ubuntu/+source/python/+bug/1767551

I have just done a fresh install of 0.67.1 onto the released version of Lubuntu 18.04 and didn’t have any problems.

1 Like

Use this: https://github.com/ggmanugg/build_hassio

I tried this, and it seems to complete then says to connect using https://ipaddress:8123… I put in my ip address but it doesn’t connect. Any ideas of what I did wrong? I can ping the ip.