Modern Python Projects Transcripts
Chapter: Python versions and packages
Lecture: Troubleshooting pyenv

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Most of the time, pyenv work without any problems.
0:03 But if you run into some issues like I did before,
0:06 Here are some things that you can check.
0:09 It's possible that after you install a new version of python pyenv wont detected right away
0:13 In this case, you can either restart your terminal,
0:17 which will run the pyenv init,
0:19 command, or you can manually run pyenv rehash,
0:23 and they should fix the issue, if something goes wrong
0:28 When installing a new python version,
0:30 you can always uninstall with pyenv uninstall and try to install it again.
0:36 And finally, if something goes wrong with pyenv itself,
0:40 you can always uninstall it, by following the uninstalling pyenv instructions from the github.
0:46 And then you can install it again.
0:49 So here, as you can see,
0:50 if you want to completely uninstalle pyenv,
0:53 you have to remove the pyenv directory and then run brew uninstall pyenv if used homebrew
0:59 Or use the corresponding command for your package manager.
1:04 After you uninstall pyenv, everything goes back to how it was before your operating system
1:09 will go back to using the system python or any other python version that you have
1:13 installed before. This is all thanks to the fact that pyenv doesn't try to modify
1:18 the existing Python versions, but it uses a system of shims to.
1:23 Insert its own python versions before the system python version into your path
1:28 variable. If you're curious how pyenv works,
1:31 check out the next lecture. If not,
1:33 jump to the next part of this chapter where I will talk about managing python dependencies.