What steps should I take to ensure Spyder uses PySimpleGUI v4 instead of the newer v5?

Thamir Andrews
Updated 16 hours ago in
1

Hey everyone! 👋

I’m working on a Python project using Spyder as my IDE, and I’ve run into a version issue with PySimpleGUI. The latest version, PySimpleGUI 5, has some changes that aren’t compatible with parts of my code or the behavior I’m expecting. So I want to stick with version 4 for now.

My question is:
How can I make sure that Spyder uses PySimpleGUI version 4 instead of automatically picking up version 5?

I’m basically looking for guidance on how to downgrade or lock the version inside Spyder’s environment so I can continue working without any issues. If anyone has done this before or knows the best way to manage package versions in Spyder, I’d really appreciate your help!

Thanks in advance

  • Answers: 1
 
16 hours ago

Here’s the quickest way to handle this in Spyder:

Method 1: Use Spyder’s built-in console

pip install PySimpleGUI==4.60.5

(Replace 4.60.5 with your preferred 4.x version)

Method 2: If using Anaconda/conda

conda install pysimplegui=4.60.5

Method 3: Check your environment first In Spyder’s IPython console, run:

import PySimpleGUI as sg
print(sg.version)

Pro tip: If you’re using Anaconda, make sure Spyder is installed in the same environment where you downgraded PySimpleGUI. You can check this in Spyder under Tools → Preferences → Python Interpreter.

To prevent future auto-updates: Create a requirements.txt file with PySimpleGUI==4.60.5 to lock the version for your project.

The key is ensuring Spyder and PySimpleGUI are in the same Python environment. If you’re still having issues, restart Spyder after the downgrade!

  • Liked by
Reply
Cancel
Loading more replies