How To Fix “WARNING: `pyenv init -` no longer sets PATH. Run `pyenv init` to see the necessary changes to make to your configuration.”?
Are you having problems with the issue “WARNING: `pyenv init -` no longer sets PATH. Run `pyenv init` to see the necessary changes to make to your configuration.“? How to fix it? In today’s article, I will provide solutions for you to solve the issues. Please follow the below steps to get the problem resolved now
How did “WARNING: `pyenv init -` no longer sets PATH. Run `pyenv init` to see the necessary changes to make to your configuration.” occur?
WARNING: `pyenv init -` no longer sets PATH. Run `pyenv init` to see the necessary changes to make to your configuration.
When you work with Python, you may get the issue WARNING: `pyenv init -` no longer sets PATH. Run `pyenv init` to see the necessary changes to make to your configuration.. Don’t worry, we are here to provide you solutions in order to resolve your problem.
How to fix “WARNING: `pyenv init -` no longer sets PATH. Run `pyenv init` to see the necessary changes to make to your configuration.”?
To Solve WARNING pyenv init -
is no longer setting PATH To see what changes you need to make to your delete/comment configuration, run pyenv init
. If ~/.bashrc
is available, add these pnes to before. Then, create the Source profile.
Solution 1
These lines are delete/comment if ~/.bashrc
is used.
export PATH="/home/yogi/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
These lines are before sourcing ~/.bashrc
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
Next, you can view the Source profile
source ~/.profile
Solution 2
Simply replace eval "$(pyenv init -)"
in your ~/.bashrc
files with eval "$(pyenv init --path)"
.
Final words
The above are useful solutions that can help you fix “WARNING: `pyenv init -` no longer sets PATH. Run `pyenv init` to see the necessary changes to make to your configuration.” problem, if you can’t solve it well. Please leave a message.