Python 3.6 support is deprecated in virtualenv

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
novitibo
Posts: 86
Joined: Mon Feb 29, 2016 5:11 pm

Python 3.6 support is deprecated in virtualenv

Post by novitibo »

Python 3.6 support is deprecated and will be removed in the first release after December 15, 2019. Please upgrade Python to 3.7.0 or higher.

What is the best way to update python for Home assistant in Dietpi virtualenv?
Ziocharly
Posts: 9
Joined: Mon Nov 11, 2019 4:02 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by Ziocharly »

+1

Just the same question: right way to update python venv, used for HA, to the V.3.8 ?

Anyone have idea ???
User avatar
MichaIng
Site Admin
Posts: 2425
Joined: Sat Nov 18, 2017 6:21 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by MichaIng »

I currently implemented it with 3.7.5, since 3.8 was still in beta? But we could test it, from within the dev branch:

Code: Select all

G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=dev' /DietPi/dietpi.txt
dietpi-update 1
sed -i 's/3\.7\.5/3.8.0/' /DietPi/dietpi/dietpi-software
dietpi-software install 157 # or "reinstall"
Ziocharly
Posts: 9
Joined: Mon Nov 11, 2019 4:02 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by Ziocharly »

@MichaIng, ok, I'll try !

Only one confirmation :
inside HA now I see venv 3.6.3, not 3.7.5,
I've to edit your sample command ?
or I can run anyway this syntax, before install 157...

Thanks for support !!! :)
User avatar
MichaIng
Site Admin
Posts: 2425
Joined: Sat Nov 18, 2017 6:21 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by MichaIng »

Current stable DietPi ships v3.6.3 indeed, dev branch (the first commands apply it, which should be hence done first) ships v3.7.5, so there the sed replacement will work.
Ziocharly
Posts: 9
Joined: Mon Nov 11, 2019 4:02 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by Ziocharly »

Umhhh, something wrong :

pyenv-virtualenv: `3.8.0' is not installed in pyenv.
pyenv: version `homeassistant-3.8.0' not installed
homeassistant-3.6.3
pyenv-virtualenv: version `homeassistant-3.8.0' is not a virtualenv

and HA remain on python 3.6.3....
Ziocharly
Posts: 9
Joined: Mon Nov 11, 2019 4:02 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by Ziocharly »

Sorry,
for venv update I miss this part:

https://www.home-assistant.io/docs/inst ... irtualenv/
User avatar
novitibo
Posts: 86
Joined: Mon Feb 29, 2016 5:11 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by novitibo »

Ziocharly wrote: Wed Nov 13, 2019 9:00 am Sorry,
for venv update I miss this part:

https://www.home-assistant.io/docs/inst ... irtualenv/
so, what is the procedure for python update under virtualenv?
User avatar
MichaIng
Site Admin
Posts: 2425
Joined: Sat Nov 18, 2017 6:21 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by MichaIng »

There is a difference between venv (guide) and pyenv what we use. To update Python within the pyenv, reinstall Home Assistant as of my post above. This assures that everything is done with right user and all related versions fit together.

So it seems that Python 3.8.0 is not yet supported by pyenv, however I will do some test later as well. However with current dev branch Python 3.7.5 is installed which should work very well and in theory more stable than a first new minor version update.
User avatar
novitibo
Posts: 86
Joined: Mon Feb 29, 2016 5:11 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by novitibo »

I tried:
- dietpi-software reinstall 157
WARNING: Can not proceed with installation. Kindly remove the '/home/homeassistant/.pyenv' directory first.
I deleted that folder and - dietpi-software reinstall 157

Now on ha-ip:8123:
404: Not Found
Post Reply