![]() This can cause breakages down the line in frustrating ways that can be difficult to troubleshoot. Too often, people just download the latest Python release, move it to their path, and call it a day (or use brew install python3, which would do something similar). Many users have dozens of Python interpreters on their computer already, but have no idea how to manage them effectively. Pondering Python runtimes can be comically challenging at times, as noted by XKCD. ![]() The version of Python that ships with macOS is well out of date from what Python recommends using for development. Now that you have your Python versions fixed, it's safe to explore why this problem confuses so many people. I mention how to use the built in venv library in the article, and Moshe recommends virtualenvwrapper for managing virtual environments. It's also essential, for dependency management, to use virtual environments. SuccessĪs you get comfortable with this workflow, you can use pyenv to manage multiple versions of Python. Using Moshe's recommendation to use a version manager (pyenv) enables us to easily accept future upgrades without getting confused about which Python we are running at a given time. Now we know for certain that we're using Python 3.7.3 and pip will update alongside it without any manual aliasing between versions. bash_profile for Bash) should include these lines: if command -v pyenv 1>/dev/null 2>
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |