<?xml version="1.0" encoding="utf-8" standalone="yes"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Python Developer Tooling Handbook – Virtual-Environments</title>
    <link>https://pydevtools.com/tags/virtual-environments/</link>
    <description>The Python Developer Tooling Handbook is a comprehensive guide to Python development tools including uv, ruff, pytest, mypy, ty, and more.</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Sat, 19 Jul 2025 09:27:00 -0400</lastBuildDate>
    
	  <atom:link href="https://pydevtools.com/tags/virtual-environments/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>uv 0.8 Release: Automatic Python Installation to PATH</title>
      <link>https://pydevtools.com/blog/uv-0-8-release-automatic-python-installation-to-path/</link>
      <pubDate>Sat, 19 Jul 2025 09:27:00 -0400</pubDate>
      <author>Tim Hopper</author>
      <guid>https://pydevtools.com/blog/uv-0-8-release-automatic-python-installation-to-path/</guid>
      <description>&lt;p&gt;[!TIP]&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;a href=&#34;https://pydevtools.com/handbook/how-to/how-to-upgrade-uv/&#34;&gt;Check out our guide to upgrading uv&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&#34;https://pydevtools.com/handbook/reference/uv/&#34;&gt;uv&lt;/a&gt; 0.8 stabilizes one of the most significant workflow improvements in Python tooling: automatic installation of Python executables to your PATH. This means you can finally install Python versions with &lt;code&gt;uv python install&lt;/code&gt; and use them system-wide without wrestling with environment activation.&lt;/p&gt;
&lt;h2&gt;Global Python Access Without the Hassle&lt;span class=&#34;hx:absolute hx:-mt-20&#34; id=&#34;global-python-access-without-the-hassle&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#global-python-access-without-the-hassle&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The headline feature addresses a long-standing frustration in Python development. When you run:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Managing Python Versions In Your uv Projects</title>
      <link>https://pydevtools.com/blog/managing-python-versions-in-your-uv-projects/</link>
      <pubDate>Wed, 25 Jun 2025 10:09:00 +0000</pubDate>
      <author>Tim Hopper</author>
      <guid>https://pydevtools.com/blog/managing-python-versions-in-your-uv-projects/</guid>
      <description>&lt;p&gt;One of the many ways the package manager &lt;a href=&#34;https://pydevtools.com/handbook/reference/uv/&#34;&gt;uv&lt;/a&gt; has changed Python is by making it painless to install and run different versions of the Python interpreter.&lt;/p&gt;
&lt;p&gt;That said, I&amp;rsquo;ve occasionally gotten tripped up configuring this correctly in my development environments. I&amp;rsquo;ve written a few articles to try to clarify things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;https://pydevtools.com/handbook/how-to/how-to-install-python-with-uv/&#34;&gt;How to install Python with uv&lt;/a&gt;. Before you can pin a Python version, you need to have it installed.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://pydevtools.com/handbook/explanation/what-is-a-python-version-file/&#34;&gt;What is a .python-version file?&lt;/a&gt; Not unique to uv, a .python-version file specifies which Python version should be used for a particular project or directory.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://pydevtools.com/handbook/explanation/what-is-a-python-version-file/#python-version-vs-requires-python-in-pyprojecttoml&#34;&gt;.python-version vs requires-python in pyproject.toml&lt;/a&gt;. The former is for development environments, while the latter is for package metadata.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://pydevtools.com/handbook/how-to/how-to-change-the-python-version-of-a-uv-project/&#34;&gt;How to change the python version of a uv project&lt;/a&gt;. If &lt;code&gt;uv run&lt;/code&gt; isn&amp;rsquo;t using the version of Python you expected or wanted, here is what you can do.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The goal of the handbook is to help you understand the ecosystem of tools used to make Python development easier and more productive. What are some missing topics you&amp;rsquo;d like to see included?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Why Use uv Projects Instead of requirements.txt?</title>
      <link>https://pydevtools.com/blog/requirementstxt-vs-pyprojecttoml/</link>
      <pubDate>Wed, 19 Feb 2025 09:17:00 +0000</pubDate>
      <author>Tim Hopper</author>
      <guid>https://pydevtools.com/blog/requirementstxt-vs-pyprojecttoml/</guid>
      <description>&lt;div class=&#34;hx:overflow-x-auto hx:mt-6 hx:flex hx:rounded-lg hx:border hx:py-2 hx:ltr:pr-4 hx:rtl:pl-4 hx:contrast-more:border-current hx:contrast-more:dark:border-current hx:border-blue-200 hx:bg-blue-100 hx:text-blue-900 hx:dark:border-blue-200/30 hx:dark:bg-blue-900/30 hx:dark:text-blue-200&#34;&gt;
  &lt;div class=&#34;hx:ltr:pl-3 hx:ltr:pr-2 hx:rtl:pr-3 hx:rtl:pl-2&#34;&gt;&lt;svg height=1.2em class=&#34;hx:inline-block hx:align-middle&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34; fill=&#34;none&#34; viewBox=&#34;0 0 24 24&#34; stroke-width=&#34;2&#34; stroke=&#34;currentColor&#34; aria-hidden=&#34;true&#34;&gt;&lt;path stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34; d=&#34;M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z&#34;/&gt;&lt;/svg&gt;&lt;/div&gt;

  &lt;div class=&#34;hx:w-full hx:min-w-0 hx:leading-7&#34;&gt;
    &lt;div class=&#34;hx:mt-6 hx:leading-7 hx:first:mt-0&#34;&gt;This is an excerpt from the forthcoming Python Developer&amp;rsquo;s Tool Handbook. The handbook provides comprehensive guidance on Python tooling and best practices for modern Python development.&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;The Python ecosystem offers two main approaches to managing project dependencies: the traditional requirements.txt file and the newer &lt;a href=&#34;https://packaging.python.org/en/latest/guides/writing-pyproject-toml/&#34;target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;pyproject.toml&lt;/a&gt; standard. Understanding the strengths and limitations of each helps inform better choices for Python development.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Flexible Python Version Management with uv and tox</title>
      <link>https://pydevtools.com/blog/flexible-version-management-for-tox/</link>
      <pubDate>Wed, 12 Feb 2025 10:20:00 +0000</pubDate>
      <author>Tim Hopper</author>
      <guid>https://pydevtools.com/blog/flexible-version-management-for-tox/</guid>
      <description>&lt;p&gt;When working with Python projects that use &lt;a href=&#34;https://pydevtools.com/handbook/reference/tox/&#34;&gt;tox&lt;/a&gt; for testing, you may encounter version mismatch errors like:&lt;/p&gt;
&lt;div class=&#34;hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code&#34;&gt;

&lt;div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;lint-format: skipped because could not find python interpreter with spec(s): python3.8
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&#34;hextra-code-copy-btn-container  hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0&#34;&gt;
  &lt;button
    class=&#34;hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50&#34;
    title=&#34;Copy code&#34;
    aria-label=&#34;Copy code&#34;
    data-copied-label=&#34;Copied!&#34;
  &gt;
    &lt;div class=&#34;hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4&#34;&gt;&lt;/div&gt;
&lt;div class=&#34;hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4&#34;&gt;&lt;/div&gt;
  &lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This happens when tox expects a specific Python version that isn&amp;rsquo;t available in your environment. Traditionally, this would require:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Require pip to install packages in virtual environment</title>
      <link>https://pydevtools.com/blog/require-pip-to-install-in-virtual-environments/</link>
      <pubDate>Mon, 04 Mar 2024 15:34:08 +0000</pubDate>
      <author>Tim Hopper</author>
      <guid>https://pydevtools.com/blog/require-pip-to-install-in-virtual-environments/</guid>
      <description>&lt;p&gt;A frequently heard piece of advice in improving Python development practice is using &lt;a href=&#34;https://docs.python.org/3/library/venv.html&#34;target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;virtual environments&lt;/a&gt; to install dependencies. Virtual environments isolate your dependencies per project to protect you from annoying version conflicts.&lt;/p&gt;
&lt;p&gt;You can restrict pip to only install in virtual environments by running&lt;/p&gt;
&lt;div class=&#34;hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code&#34;&gt;

&lt;div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip config &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; global.require-virtualenv true&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&#34;hextra-code-copy-btn-container  hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0&#34;&gt;
  &lt;button
    class=&#34;hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50&#34;
    title=&#34;Copy code&#34;
    aria-label=&#34;Copy code&#34;
    data-copied-label=&#34;Copied!&#34;
  &gt;
    &lt;div class=&#34;hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4&#34;&gt;&lt;/div&gt;
&lt;div class=&#34;hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4&#34;&gt;&lt;/div&gt;
  &lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This updates your global &lt;a href=&#34;https://pip.pypa.io/en/stable/topics/configuration/#location&#34;target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;pip config file&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Quick start guide for Python development on a Mac</title>
      <link>https://pydevtools.com/blog/python-quickstart/</link>
      <pubDate>Mon, 05 Feb 2024 00:00:00 +0000</pubDate>
      <author>Tim Hopper</author>
      <guid>https://pydevtools.com/blog/python-quickstart/</guid>
      <description>&lt;div class=&#34;hx:overflow-x-auto hx:mt-6 hx:flex hx:flex-col hx:rounded-lg hx:border hx:py-4 hx:px-4 hx:border-gray-200 hx:contrast-more:border-current hx:contrast-more:dark:border-current hx:border-blue-200 hx:bg-blue-100 hx:text-blue-900 hx:dark:border-blue-200/30 hx:dark:bg-blue-900/30 hx:dark:text-blue-200&#34;&gt;
  &lt;p class=&#34;hx:flex hx:items-center hx:font-medium&#34;&gt;&lt;svg height=16px class=&#34;hx:inline-block hx:align-middle hx:mr-2&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34; fill=&#34;none&#34; viewBox=&#34;0 0 24 24&#34; stroke-width=&#34;2&#34; stroke=&#34;currentColor&#34; aria-hidden=&#34;true&#34;&gt;&lt;path stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34; d=&#34;M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z&#34;/&gt;&lt;/svg&gt;Note&lt;/p&gt;

  &lt;div class=&#34;hx:w-full hx:min-w-0 hx:leading-7&#34;&gt;
    &lt;div class=&#34;hx:mt-6 hx:leading-7 hx:first:mt-0&#34;&gt;&lt;p&gt;For a modern approach, consider &lt;a href=&#34;https://pydevtools.com/handbook/reference/uv/&#34;&gt;uv&lt;/a&gt;, which handles Python installation, project management, and dependency management in a single tool. The pyenv + Poetry workflow described below remains valid, but uv offers a more streamlined experience.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
