Entries not evaluated when using Python notebook

Hello!

I am new to LabPlot and its main attraction to me was the possibility to integrate python notebooks and data analysis with a graphical ui for plotting.

My problem is that when I create a notebook (File → Add New → Notebook → Python) and type in a simple expression, e.g. print('Hello world'), I seem to be unable to evaluate it. Whether I use shift+enter or Notebook → Evaluate entry or Evaluate Notebook, the backend counter on the left goes up but no output is produced:

I came across a similar issue in KDE bug #458164 and checked the KDE Userbase FAQs but I couldn’t find a solution to my problem. I am running Windows 10, Labplot 2.10.1 (release build 92f5d9a), and python 3.10.9 (python added to environmental variables, works from Windows command prompt), so my understanding according to the FAQs above is that it should work.

Can anyone suggest a solution or further troubleshooting?

Can you please start labplot in the terminal (“power shell”) and try to evaluate such an expression and share the output here?

Sure! I hope this is what you are asking for?

this error usually comes when python.exe is not found in the environment. can you double check your $PATH once more? Does it work if you start python.exe in the same terminal?

I installed Python through an Anaconda distribution and added the anaconda3 path to the environment variables.

This is now the second time this problem was reported with the Anaconda setup, we’ll need to check it in more details.

Can you please try out the standard CPython distribution https://
www.python.org/downloads/release/python-31011/and make sure the option to set the PATH variable is selected during the installation as shown on the
screenshot below?
python_install_path

I installed standalone Python 3.10.11, but still seem to get the same error:

:frowning: Just to make sure, you uninstalled the Anaconda environment, installed the standard CPython distribution and re-opened the power shell to start labplot, right?

I uninstalled Labplot2 and reinstalled it using the current release build (Release build Jul 10 2023, 17:17:19). Now it works ok!
I originally used this same version and then tried the development build to see if it solved the problem. I used the development version when posting and troubleshooting in the messages above.

I am now using standalone Python 3.10.11 and the release build 2.10.0 and it works. Anaconda was installed from the beginning and I never unistalled it, but I removed its environment variables for python when installing standalone python.

The development version of Labplot2 with standalone Python 3.10.11 did not work.

I assume then there is an issue with Labplot2 and the Anaconda python installation? I hope this can help further development.

Thank you very much for your time and assistance @asemke !

Oh, I didn’t realize you were using the development version of labplot… For the development version you need already python 3.11 IIRC. We’ll document this requirement soon.

Before trying the development version I was using the normal Labplot2 2.10 release build with python 3.10.9 from Anaconda distribution, and was running into the problem I described in my first post. I am now using Labplot2 2.10 normal release build with standalone python 3.10.11 and the notebooks work fine.

So it does seem to me that there is an issue in using Labplot2 python notebooks with python installed through the Anaconda distribution, even though the Labplot and python versions are supposed to be compatible (Labplot 2.10 with python 3.10).