making python3.6.4 default python3
I recently installed Python 3.6.4 and when I open the terminal and run
Code:
python3 Code:
python3.6 Code:
$ which python Code:
/usr/bin Code:
/usr/local/bin Code:
apt install build-essential checkinstall Code:
/usr/bin |
What does the following command show?
Code:
export $PATH Code:
whereis python3.6.4 |
On my system (Fedora, so /bin is a link to /usr/bin) /usr/bin/python3 is a link to /usr/bin/python3.6. Perhaps it's as simple as changing the python3 link to point to the installed python3.6.4
|
Here is the ouptput:
Code:
$ export $PATH Code:
export $PATH Code:
echo $PATH The interesting thing to me is that in my PATH Code:
/usr/local/bin Code:
/usr/bin |
export PATH, there is no $
This is the main difference. see man bash and look for export command, this is a built-in. |
You just change the python3 link to point to the version you wish. But that might break more than a few things on the system. But, you can try it.
|
Quote:
Code:
python3.6 |
Creating an alias does not solve the issue and avoiding the typing of two extra characters is not the goal nor worth creating an alias for so I've scrapped that idea. Is there no way to simply upgrade the default python3 version to the latest stable release? It seems that there should be, and that it should be relatively straight forward. I created a virtual KDE Neon and explicitly installed Python 3.6.5 to
Code:
/usr/bin Code:
python3 Does anyone know if there is a way to simply upgrade the default Python3 to the latest stable version? |
You would do it likw this
Code:
$ cd /usr/bin |
Quote:
Quote:
Code:
/usr/bin On a side note there is an interesting anomaly in the virtual Neon. In my other virtual machines (Centos, Debian) it is necessary to click in the machine to capture the mouse and keyboard and then press right cntrl to return mouse and keyboard to the system, but in the Neon virtual machine the mouse is always available to both the virtual machine and the system. It is hard to tell whether the keyboard is the same as it is available to the currently active window under normal operation. I think that is weird and thought I would share it .......any thoughts? |
I think that should be:
ln -s python3.6.4 python3 |
This is straight from the ln man pages:
Code:
SYNOPSIS Code:
ln -s python3.6.4 python3 Code:
ln -s python3 python3.6.4 Code:
ln -s /usr/bin/python3 python3.6.4 Code:
ln -s python3.6.4 /usr/bin/python3 Code:
$ cd /usr/bin |
if you wish to play/learn ln, just create a new dir (as regular user) and try any combinations - on simple, short text files. That will not harm your system and you will understand the meaning of those options...
Post #11 should work only if you are already in /usr/bin, otherwise it will not make what you need. The 4th form is not really applicable in your case I think. https://www.cyberciti.biz/faq/creati...symbolic-link/ https://unix.stackexchange.com/quest...he-usage-of-ln |
Ok, so some of my last post on this thread was forgetting that the suggested commands were being run from within the directory i.e.:
Code:
$ cd /usr/bin Code:
$ ln -s /usr/bin/Python-3.6.5/python /usr/bin/python3 |
in general there are a lot of things running with python (=python2) and python3. The installed python codes/scripts assume an installed and compatible python executable. Replacing this may cause incompatibilities. You need to know what are the differences between 3.5.2 and 3.6.4 and which code will depend on those changes. Most probably none, but maybe there is something....
|
All times are GMT -5. The time now is 06:13 PM. |