Python upgrade breaks application
by rocknrobin from LinuxQuestions.org on (#528TJ)
Recently my Slackware 14.2 distro broke an application, possibly more I may not have run across any others yet, when it upgraded from python 3.7 to 3.8. The aforementioned application that was broken was compiled under 3.7. I then had to add a couple of python dependencies back to the new 3.8 installation and also add the command "alias python=python3" to the command line and re-install the application to get the python bindings back and successfully install under the 3.8 version. I notice that when I run python --version I get:
Quote:
I see that Python, 2.7, 3.7, and 3.8 are all installed, but the version still shows 2.7. I am seeing in usr/bin:
Quote:
I have some questions about this.
(1). When python is upgraded through slackpkg wouldn't the dynamic link above automatically change to follow the upgrade?
(2). When I add the alias mentioned above to set up the python version correctly it goes away after reboot and reverts back to the python version reflecting 2.7.17 again. Is there a way to make the alias permanent after reboot?
(3). This question is related to number 2. Would a better way to fix the python version issue be to change the dynamic link in /usr/bin to reflect python3, to wit python -> python3, or would this break even more things? In other words are there still applications out there that depend on the older python 2.7 so that the version number needs to reflect it?


Quote:
# python --version Python 2.7.17 |
Quote:
# ls -l python lrwxrwxrwx 1 root root 9 Dec 27 18:07 python -> python2.7* |
(1). When python is upgraded through slackpkg wouldn't the dynamic link above automatically change to follow the upgrade?
(2). When I add the alias mentioned above to set up the python version correctly it goes away after reboot and reverts back to the python version reflecting 2.7.17 again. Is there a way to make the alias permanent after reboot?
(3). This question is related to number 2. Would a better way to fix the python version issue be to change the dynamic link in /usr/bin to reflect python3, to wit python -> python3, or would this break even more things? In other words are there still applications out there that depend on the older python 2.7 so that the version number needs to reflect it?