Python 3.6 support is deprecated in virtualenv

Having issues with your DietPi installation, or, found a bug? Post it here.
mehdiheidari
Posts: 2
Joined: Sun Dec 01, 2019 4:21 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by mehdiheidari »

Hi @MichaIng, is there any anticipated date to release DietPi version 6.27?
I don't want to mess around my home assistant instance due to deprecation of python 3.6.

I'm not expert in managing installations within virtual environment and unfortunately couldn't find a reliable source to follow and upgrade pyenv and python versions within home assistant.

Any help/guidance from other users is highly appreciated! :D

Many thanks in advance
Mehdi
User avatar
novitibo
Posts: 77
Joined: Mon Feb 29, 2016 5:11 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by novitibo »

This works great:

Code: Select all

dietpi-backup # Please update/create a backup first
G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=dev' /DietPi/dietpi.txt
dietpi-update 1
dietpi-software reinstall 157
htop # Wait until CPU usage of HA process goes down
systemctl restart home-assistant # Required currently since first start fails to pull some Python module, no idea why...
htop # Wait until CPU usage of HA process goes down

If everything works well, you might want to leave it but have the next stable DietPi release installed over the development version:
G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=master' /DietPi/dietpi.txt

If something does not work as expected, please report, so I'll assist quickly, or you might want to restore the backup:
dietpi-backup -1
mehdiheidari
Posts: 2
Joined: Sun Dec 01, 2019 4:21 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by mehdiheidari »

Thanks a lot @novitibo,
It worked like a charm.

Much appreciate your help.

Cheers!
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by MichaIng »

@mehdiheidari
Ah, this solved the issue on Stretch as well? Good to know, so no workaround required, at least not with our Python3.8 implementation :).

Okay, so the quick-update script will be added tonight, then the beta is ready to be pushed.

EDIT: Ah sorry mixed it up with @Ziocharly, so Stretch test/workaround still outstanding.
jfg31113
Posts: 1
Joined: Sat Dec 28, 2019 2:01 am

Re: Python 3.6 support is deprecated in virtualenv

Post by jfg31113 »

Sorry but not working for me:

G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=dev' /DietPi/dietpi.txt # Does not work had to change dietpi.txt manually
dietpi-update 1 # Update to beta version ok.
dietpi-software reinstall 157 # I get thease errors and dosn´t update:

dash: 2: source: not found
dash: 3: pyenv: not found
dash: 4: pyenv: not found
dash: 5: pip3: not found
dash: 7: pip3: not found
bubez81
Posts: 1
Joined: Fri Mar 22, 2019 4:40 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by bubez81 »

Exact same problem, during the process I can see:

Code: Select all

[  OK  ] DietPi-Software | G_AGI gcc libc6-dev make zlib1g-dev libbz2-dev libreadline-dev libssl-dev libsqlite3-dev libffi-dev
[  OK  ] DietPi-Software | G_THREAD: All threads finished
[  OK  ] DietPi-Software | tar xf 157.tar 
[  OK  ] DietPi-Software | rm 157.tar
dash: 2: source: not found
dash: 3: pyenv: not found
dash: 4: pyenv: not found
and then:

Code: Select all

ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.8/site-packages/more_itertools-8.0.2.dist-info'
Consider using the `--user` option or check the permissions.
huettenwirt
Posts: 1
Joined: Wed Jan 01, 2020 12:40 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by huettenwirt »

Same here. Any ideas how to resolve this? I'm currently without my beloved homeassistant since the dietpi-backup restore didn't work either...

Thanks and best regards,
Huettenwirt
mail2rst
Posts: 51
Joined: Fri Apr 13, 2018 4:53 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by mail2rst »

it is also not working for me also, i download latest image (DietPi_RPi-ARMv6-Buster) and try to install home assistant. it was not working, even also proFTP file sharing server not working, dietpi-software not working properly & fail to install some software

the software not installed are ProFTP, Avahi-Daemon, Home Assistant

the software installed properly are Node Red, Mosquito
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by MichaIng »

@mail2rst
Which RPi version do you try it on and are you on DietPi v6.27.2 already?

Also please paste the error messages or logs you face in order to be able to investigate the issue. I'm currently running test installs on RPi2.
mail2rst
Posts: 51
Joined: Fri Apr 13, 2018 4:53 pm

Re: Python 3.6 support is deprecated in virtualenv

Post by mail2rst »

DietPi v6.27.2 (dev) version i am using

after that i used your instruction

sed -i '/local ha_pyenv_activation/s/source/\./' /DietPi/dietpi/dietpi-software
dietpi-software install 157

and system able to install home assistant after that & confirmed it is working properly. but still proFTP not working
Attachments
dietpi1.jpg
Post Reply