Goal: I am trying to install the "pyenv" on my Linux machine with the help of this article "https://realpython.com/intro-to-pyenv/"
Expected Result: according the article pyenv should add to the "load path" of my Linux machine.
Actual Result: pyenv doesnt add to the load path and I have to manually add to the .bashrc file.
Error Messages: Actually I am not seeing any error messages for now. When I close my terminal window and open new one ; each time my terminal window opens up with the below message.
WARNING: `pyenv init -` no longer sets PATH.
Run `pyenv init` to see the necessary changes to make to your configuration.
[centos@localhost ~]$
What I have done: I have searched through the SO for answers and I found my issue with some resolutions. but they didn't work for me as expected.
I have added the below lines to the .bashrc file of my user.
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
Mind you that, even though this warning comes every time when I add 'pyenv' command to the terminal it shows me with the valid result.
for the references below is my .bash_profile and .bashrc files contents.
.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
#JAVA_HOME=/data/programs/jdk1.8.0_221
#JAVA_HOME=/data/programs/jdk-13.0.2
#JAVA_HOME=/data/programs/jdk1.7.0_80
JAVA_HOME=/data/programs/jdk-11.0.8
#JAVA_HOME=/data/programs/jdk-14.0.1
M2_HOME=/data/programs/apache-maven-3.6.1
JRE_HOME=$JAVA_HOME
export PATH JAVA_HOME M2_HOME JRE_HOME
export PATH=$JAVA_HOME/bin:$M2_HOME/bin::$PATH
export PATH
Also below is my .bashrc file contents.
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
Environment: Centos 7
I want remove this error when I'm opening a terminal session every time. How do I resolve this ?