<?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/pt-br/tags/pyenv/</link><description>Recent content in Pyenv on thomazrb</description><generator>Hugo -- 0.147.9</generator><language>pt-br</language><lastBuildDate>Thu, 23 Jul 2026 13:30:00 -0300</lastBuildDate><atom:link href="https://thomazrb.github.io/pt-br/tags/pyenv/index.xml" rel="self" type="application/rss+xml"/><item><title>Gerenciando Versões do Python no macOS com pyenv</title><link>https://thomazrb.github.io/pt-br/posts/pyenv-macos/</link><pubDate>Thu, 23 Jul 2026 13:30:00 -0300</pubDate><guid>https://thomazrb.github.io/pt-br/posts/pyenv-macos/</guid><description>&lt;p>O macOS já vem com Python, mas usar o Python do sistema pra seus projetos é pedir problema. O &lt;strong>pyenv&lt;/strong> resolve isso de forma elegante: instale quantas versões quiser e escolha qual usar por projeto, sem conflito.&lt;/p>
&lt;h3 id="instalação">Instalação&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>Depois, adicione ao seu shell (&lt;code>~/.zshrc&lt;/code> ou &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>Recarregue o 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="instalando-versões-do-python">Instalando versões do Python&lt;/h3>
&lt;p>Liste as versões disponíveis:&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>pyenv install --list
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Instale a que quiser:&lt;/p></description></item></channel></rss>