Closed goncaloperes closed 3 years ago
Same error under Funtoo-Linux. Using the above fix, the error message goes away, when starting a new interactive shell (terminal). However, when running
❯ pyenv
bash: pyenv: command not found
still errors out.
For Ubuntu OS, you can face the same problem. So, after installing the dependencies and pyenv in terminal just type the following commands one by one : $ export PATH="/home/username/.pyenv/bin:$PATH" $ eval "$(pyenv init -)" $ eval "$(pyenv virtualenv-init -)" Afterwards you can check if it worked by just hitting enter after typing pyenv This should return the help documentation of pyenv, i.e., the basic commands and other help content Your welcome!
I have done the steps provided by @goncaloperes . but still I am getting below error.
I am using Centos 7. Can anyone face this issue ?
[centos@localhost ~]$ exec "$SHELL"
WARNING: pyenv init -
no longer sets PATH.
Run pyenv init
to see the necessary changes to make to your configuration.
Pyenv installer gives you instructions about what you need to do next (install Pyenv into the shell, it can't do that automatically due to many different shell setups out there).
Note that in version 2.0.0, the required shell setup has changed, so please heed the instructions (so that you don't waste your and our time reporting bugs that are not there).
For Ubuntu OS, you can face the same problem. So, after installing the dependencies and pyenv in terminal just type the following commands one by one : $ export PATH="/home/username/.pyenv/bin:$PATH" $ eval "$(pyenv init -)" $ eval "$(pyenv virtualenv-init -)" Afterwards you can check if it worked by just hitting enter after typing pyenv This should return the help documentation of pyenv, i.e., the basic commands and other help content Your welcome!
The problem is not solved, still getting the same error.
on RL8, a note to myself or other.
After I exited out of 2nd bash spawn of 1st bash. the installer script works.
[me@rocky8t01 ~]$ ps
PID TTY TIME CMD
816324 pts/0 00:00:01 bash
1061241 pts/0 00:00:00 bash
1062501 pts/0 00:00:00 ps
[me@rocky8t01 ~]$ exit
[me@rocky8t01 salt]$ ps
PID TTY TIME CMD
816324 pts/0 00:00:01 bash
1062591 pts/0 00:00:00 ps
[me@rocky8t01 salt]$ curl https://pyenv.run | bash
<snipped>
[me@rocky8t01 salt]$ exec "$SHELL"
For Ubuntu OS, you can face the same problem. So, after installing the dependencies and pyenv in terminal just type the following commands one by one : $ export PATH="/home/username/.pyenv/bin:$PATH" $ eval "$(pyenv init -)" $ eval "$(pyenv virtualenv-init -)" Afterwards you can check if it worked by just hitting enter after typing pyenv This should return the help documentation of pyenv, i.e., the basic commands and other help content Your welcome!
I hope both sides of your pillow are cold tonight :)
If you have downloaded pyenv to your home directory, all you have to do is add
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
to either .bashrc if you are using bash or .zshrc if you are using Oh My Zsh.
If you are on a mac for example and use zsh use this:
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc
In CentOS 7, I ran
$ curl https://pyenv.run | bash
and then
$ exec $SHELL
However when trying to see if I had pyenv installed by updating it
pyenv update
I was getting the error
Solution (found here)
It turns out the pyenv path wasn't exported to .bashrc. It can be done by executing the following commands in terminal:
Then restart the shell
exec "$SHELL"