Skip to content

Problem importing FreeSimpleGUI into a Jupyter Notebook #75

Description

@m-simeon

I am running Windows 11 Family 64 bits
I have installed miniconda3 and created mini-env environment
Under the Anaconda prompt I installed matplotlib, jupyter, jupyterlab and FreeSimpleGUI
conda list command includes freesimplegui 5.2.0.post1
I execute jupyter notebook and Jupyter opens the web page http://localhost:8888/tree
I create a new notebook called Testing_SimpleGUI
I create a code cell with import FreeSimpleGui as sg
The output is;

ModuleNotFoundError Traceback (most recent call last)
Cell In[3], line 1
----> 1 import FreeSimpleGui as sg

ModuleNotFoundError: No module named 'FreeSimpleGui'

I need help to find out what is wrong

_

Activity

  1. m-simeon commented on Jun 29, 2025

    @m-simeon
    Author

    I go to my-user-name/.conda/envs/mini-env/Scripts end run idle.exe I can create a py file and run a small test of FreeSimpleGUI, it works !
    The problem is when I try the same test from Jupyter

  2. spyoungtech commented on Jun 30, 2025

    @spyoungtech
    Owner

    I'm not a user of Anaconda, but I'll try my best to help here.

    The main thing is to make sure that you install the package into the correct environment used by the Jupyter Notebook kernel. The other thing is to make sure that the jupyter command is what you expect (this can be tricky if you've installed jupyter in multiple environments!). In cmd you can use the command where jupyter -- or in powershell get-command jupyter -- to check if the location is expected (in a subdirectory of your conda environment should be what's expected, probably).

    You can also try invoking jupyter through your activated environment:

    1. activate your conda environment
    2. run python -m jupyter notebook to launch Jupyter -- this should make sure the expected interpreter is used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions