Skip to main content
  1. Blog/

Windows Update Wiped My Poetry Path (And How to Fix It)

·354 words·2 mins

It’s been a few months since I last tried modifying the virtual environments (venvs) on my Windows machine. Poetry and package management on Windows have been a pain since 2023, and things haven’t gotten much better in 2025. Lately, I’ve been using venvs on remote Linux VMs through SSH on my homelab and honestly, it’s been really good. I still have a few projects that run on local venvs which I haven’t yet migrated to the remote setup. Running existing venvs locally works fine, but when I tried adding a new package with poetry add, I realized that Poetry was broken in the VSCode terminal. I then tried running it from the windows power shell, only to find that it was broken system-wide.

I’ve fixed this issue once before but never documented the process, so I decided to write it down properly this time. My theory is that windows update decided to “clean up” my environment variables at some point. Classic Windows!! I don’t know why only for poetry. The PowerShell just doesn’t know where to find the poetry.exe file anymore.

The term 'poetry' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

The Fix: Add Poetry Back to Your Path
#

The fix is simple. You just need to tell Windows where to find the Poetry scripts.

  1. Press the Windows key and type “Edit the system environment variables,” then open it.

Find Environment Variables

  1. Click the “Environment Variables…” button.

    Environment Variables

  2. In the top box (“User variables for [your-user]”), find the Path variable, select it, and click “Edit…”. (you can also do System variables for whole system and for all users)

  3. Click “New” and add this line (replace user with your actual username):

    C:\Users\user\AppData\Roaming\pypoetry\venv\Scripts

  4. Click “New” and add this line (replace user with your actual username):

    C:\Users\user\AppData\Roaming\pypoetry\venv\Scripts\poetry.exe

  5. Click OK on all the windows to save your changes.

Close and re-open your terminal (PowerShell) for the new Path to load. Restarting often is better.

After that, poetry --version should work just fine.