Hello Guys, How are you all? Hope You all Are Fine. I am facing WARNING: pyenv init -
no longer sets PATH. Run pyenv init
to see the necessary changes to make to your configuration. in Python. So Here I am Explain to you all the possible solutions here.
Without wasting your time, Let’s start This Article to Solve This Error.
How WARNING: pyenv init -
no longer sets PATH. Run pyenv init
to see the necessary changes to make to your configuration Error Occurs ?
I just updated pyenv
using the pyenv activate
command to activate one of my created virtual environments no longer sets the path to use what I’ve installed in that virtual environment. When I start a terminal session, I see a new message saying.
WARNING: `pyenv init -` no longer sets PATH.
Run `pyenv init` to see the necessary changes to make to your configuration.
How To Solve WARNING: pyenv init -
no longer sets PATH. Run pyenv init
to see the necessary changes to make to your configuration Error ?
How To Solve WARNING:
pyenv init -
no longer sets PATH. Runpyenv init
to see the necessary changes to make to your configuration Error ?To Solve WARNING:
pyenv init -
no longer sets PATH. Runpyenv init
to see the necessary changes to make to your configuration delete/comment these lines if you have in~/.bashrc
and Add these lines before sourcing~/.bashrc
Then, the Source profile.
Solution 1
delete/comment these lines if you have in ~/.bashrc
export PATH="/home/yogi/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
Add these lines before sourcing ~/.bashrc
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
Then, the Source profile
source ~/.profile
Solution 2
Just replace the line eval "$(pyenv init -)"
from your ~/.bashrc
file to eval "$(pyenv init --path)"
.
Summery
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also Read