Modern Python Projects Transcripts
Chapter: Python versions and packages
Lecture: Troubleshooting pyenv
0:00 Most of the time, pyenv work without any problems. But if you run into some issues like I did before, Here are some things that you can check.
0:10 It's possible that after you install a new version of Python pyenv wont detected right away In this case, you can either restart your terminal,
0:18 which will run the pyenv init, command, or you can manually run pyenv rehash, and they should fix the issue, if something goes wrong
0:29 When installing a new Python version, you can always uninstall with pyenv uninstall and try to install it again.
0:37 And finally, if something goes wrong with pyenv itself, you can always uninstall it, by following the uninstalling pyenv instructions from the github.
0:47 And then you can install it again. So here, as you can see, if you want to completely uninstalle pyenv,
0:54 you have to remove the pyenv directory and then run brew uninstall pyenv if used homebrew Or use the corresponding command for your package manager.
1:05 After you uninstall pyenv, everything goes back to how it was before your operating system
1:10 will go back to using the system Python or any other Python version that you have
1:14 installed before. This is all thanks to the fact that pyenv doesn't try to modify the existing Python versions, but it uses a system of shims to.
1:24 Insert its own Python versions before the system Python version into your path variable. If you're curious how pyenv works,
1:32 check out the next lecture. If not, jump to the next part of this chapter where I will talk about managing Python dependencies.