I did a fresh install of Ubuntu 16 LTS, but keeping a dump of the packages I had installed previously, and reinstalling them, using the answers to this question: How to backup settings and list of installed packages.
After running updates again, I tried to use python, and got this error:
/home/niel/.pyenv/libexec/pyenv-exec: line 47: /home/niel/.pyenv/versions/3.4.0/bin/python: No such file or directory
I checked manually and /home/niel/.pyenv/versions/3.4.0/bin/python
does exist.
But running /home/niel/.pyenv/versions/3.4.0/bin/python3.4 --version
gives me the same error.
bash: /home/niel/.pyenv/versions/3.4.0/bin/python3.4: No such file or directory
What's wrong here? Could the paths be broken?
UPDATE: Changing the paths in .bash_profile from
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
to
export PATH=${PATH}:/usr/bin/python3
seems to fix the problem, using the working python in /usr/bin
. Is this a good fix?