PyEnv to Manage Multiple Python Versions (MacOS)

If, after following the installation directions for PyEnv at, you run into an issue setting your python version for ‘global’, ‘local’, or ‘shell’ and you are using ZSH as you shell rather than BASH, there is a good possibility you either:

  1. Made the obvious mistake of not switching out which shell you are using from BASH to ZSH in all of your installation commands as noted in the instructions (common mistake)

or (what I ran into)

  1. The installation commands found in the installation guide failed to place the necessary shell scripts in the proper file for ZSH for your particular setup. I found that moving the shell scripts from my ~/.zshenv file to the bottom of my ~/.zshrc file solves this problem and I can once again properly set the python version I want to use using ‘pyenv global 3.8.1’. Now when I check the version ‘python –version’ in my terminal (I use iterm), I get 3.8.1 as expected.

Published by

Tim Clark

Experienced Business Owner, Chief Information Officer, Vice President, Chief Software Architect, Application Architect, Project Manager, Software Developer, Senior Web Developer, Graphic Designer & 3D Modeler, University Instructor, University Program Chair, Academic Director. Specialties: Ruby, Ruby on Rails, JavaScript, JQuery, AJAX, Node.js, React.js, Angular.js, MySQL, PostgreSQL, MongoDB, SQL Server, Responsive Design, HTML5, XHTML, CSS3, C#,, Project Management, System Design/Architecture, Web Design, Web Development, Adobe CS6 (Photoshop, Illustrator)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s