Tamo,
I did it in such a way as to avoid changing the system-wide default.
I'm on Raspberry Pi, and several system-related functions still expect
Python 2.7.
What I did is certainly not the only way, but it works for me...
On my system, /usr/local/sbin is already in the path ahead of system
default locations and it is set via /etc/profile (but you could do it in
your ~/.profile or ~/.bashrc or other dot files):
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Based on that, I did the following:
pi@nixie:~ $ cd /usr/local/sbin
pi@nixie:/usr/local/sbin $ sudo ln -s ../../bin/python3 python
That yields this behavior:
pi@nixie:~ $ which python
/usr/local/sbin/python
pi@nixie:~ $ env python --version
Python 3.7.3
And because the majority of weewx python scripts begin with the
following, it means they will end up using Python 3:
#!/usr/bin/env python
HTH,
Regards,
\Leon
Tarmo wrote on 4/30/20 2:54 PM:
Hi!
Upgraded successfully to 4.0. Now I would like to switch to Pyhton3.
Is the clean install preferred option?
running raspi & buster + few extensions
--
You received this message because you are subscribed to the Google
Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to weewx-user+unsubscr...@googlegroups.com
<mailto:weewx-user+unsubscr...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/a44ca17c-eb35-494b-bdbf-a8d4799207e3%40googlegroups.com
<https://groups.google.com/d/msgid/weewx-user/a44ca17c-eb35-494b-bdbf-a8d4799207e3%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
l...@isylum.org - Dearborn, Michigan
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/c13d7d8a-5e62-2e9a-4db7-58f41acfa093%40isylum.org.