<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Pyenv on thomazrb</title><link>https://thomazrb.github.io/tags/pyenv/</link><description>Recent content in Pyenv on thomazrb</description><generator>Hugo -- 0.147.9</generator><language>en</language><lastBuildDate>Thu, 23 Jul 2026 13:30:00 -0300</lastBuildDate><atom:link href="https://thomazrb.github.io/tags/pyenv/index.xml" rel="self" type="application/rss+xml"/><item><title>Managing Python Versions on macOS with pyenv</title><link>https://thomazrb.github.io/posts/pyenv-macos/</link><pubDate>Thu, 23 Jul 2026 13:30:00 -0300</pubDate><guid>https://thomazrb.github.io/posts/pyenv-macos/</guid><description>&lt;p>macOS ships with Python, but using the system Python for your projects is asking for trouble. &lt;strong>pyenv&lt;/strong> solves this elegantly: install as many versions as you want and choose which one to use per project, without conflicts.&lt;/p>
&lt;h3 id="installation">Installation&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>brew install pyenv
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Then add the following to your shell config (&lt;code>~/.zshrc&lt;/code> or &lt;code>~/.bashrc&lt;/code>):&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>export PYENV_ROOT&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>$HOME&lt;span style="color:#e6db74">/.pyenv&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>export PATH&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>$PYENV_ROOT&lt;span style="color:#e6db74">/bin:&lt;/span>$PATH&lt;span style="color:#e6db74">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>eval &lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#66d9ef">$(&lt;/span>pyenv init -&lt;span style="color:#66d9ef">)&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Reload your shell:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>source ~/.zshrc
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="installing-python-versions">Installing Python versions&lt;/h3>
&lt;p>List available versions:&lt;/p></description></item></channel></rss>