So I'm starting out with python. I'm working on a laptop with a fresh install of fedora25.
I got everything running in eclipse with pydev, but per directions of the instructor I need to use python 3.4 or newer.
So I check what version I'm using. Aparently it's python 2.7.13 I thought fedora post 23 used python3 by default, but such is life. So I check here and askfedora and other sources for how to change default version when you have more than one installed. And two of them suggest How to switch between Python versions on Fedora Linux. Before blindly throwing anyone's suggestion into a shell I browse around and it looks like a pretty good site.
So I followed the tutorial, and now NOTHING python related works.
$ alternatives --list | grep -i python ((no output)) $ sudo alternatives --install /usr/bin/python python /usr/bin/python3.4 2 $ sudo alternatives --install /usr/bin/python python /usr/bin/python2.7 1 $ alternatives --list | grep -i python python auto /usr/bin/python3.4 $ python -v bash: /usr/bin/python: No such file or directory $ python -V bash: /usr/bin/python: No such file or directory $ python --vesion bash: /usr/bin/python: No such file or directory
It looks like creating the symlinks as directed broke the connection between the expected python source
/usr/bin/python and everything that tries to access it. I'm sure there's an "easy" fix, but I have no idea what it could be. Help, please and thank you.
I thought using alternatvies changed the python to a set of symlinks and you had to set one (see code block below).
$ alternatives --config python There are 2 programs which provide 'python'. Selection Command ----------------------------------------------- *+ 1 /usr/bin/python3.4 2 /usr/bin/python2.7 Enter to keep the current selection[+], or type selection number: $
So why are none of them set to "answer" when something tries to follow
So I got out of the shell and used gui
Activities. Went to
python. Tried clicking on it; I get this error message:
The link "python" is broken. This link cannot be used because its target "/etc/alternatives/python" does not exist.
I don't want to set the link to point at one or the other python, right? That's the point of
alternatives, isn't it?