# Entries not evaluated when using Python notebook

**URL:** <https://discuss.kde.org/t/entries-not-evaluated-when-using-python-notebook/15149>\
**Category:** Help\
**Tags:** labplot, python\
**Created:** [May 6, 2024, 1:38pm UTC](https://discuss.kde.org/t/entries-not-evaluated-when-using-python-notebook/15149 "2024-05-06T13:38:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dean515](https://discuss-cdn.kde.org/letter_avatar_proxy/v4/letter/d/e79b87/32.png) [@dean515](https://discuss.kde.org/u/dean515)\
**Post date:** [May 6, 2024, 1:38pm UTC](https://discuss.kde.org/t/entries-not-evaluated-when-using-python-notebook/15149/1 "2024-05-06T13:38:56Z")

</div>

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:

 ![labplot_snip](https://discuss-cdn.kde.org/uploads/default/original/2X/a/a0791c75e5e55e372f525ac20155a2dc698b0004.jpeg)

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?

---

<div class="post-metadata">

**Author:** ![asemke](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/asemke/32/22289_2.png) [@asemke](https://discuss.kde.org/u/asemke)\
**Post date:** [May 6, 2024, 2:33pm UTC](https://discuss.kde.org/t/entries-not-evaluated-when-using-python-notebook/15149/2 "2024-05-06T14:33:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dean515](https://discuss-cdn.kde.org/letter_avatar_proxy/v4/letter/d/e79b87/32.png) [@dean515](https://discuss.kde.org/u/dean515)\
**Post date:** [May 6, 2024, 2:43pm UTC](https://discuss.kde.org/t/entries-not-evaluated-when-using-python-notebook/15149/3 "2024-05-06T14:43:19Z")

</div>

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

 ![labplot_cmd_snip](https://discuss-cdn.kde.org/uploads/default/original/2X/b/bdae37e7a1a10eb8e5b2ec94a7acbdc756842dc8.jpeg)

---

<div class="post-metadata">

**Author:** ![asemke](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/asemke/32/22289_2.png) [@asemke](https://discuss.kde.org/u/asemke)\
**Post date:** [May 6, 2024, 2:46pm UTC](https://discuss.kde.org/t/entries-not-evaluated-when-using-python-notebook/15149/4 "2024-05-06T14:46:53Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dean515](https://discuss-cdn.kde.org/letter_avatar_proxy/v4/letter/d/e79b87/32.png) [@dean515](https://discuss.kde.org/u/dean515)\
**Post date:** [May 6, 2024, 3:01pm UTC](https://discuss.kde.org/t/entries-not-evaluated-when-using-python-notebook/15149/5 "2024-05-06T15:01:22Z")

</div>

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

 ![labplot_cmd_snip_python](https://discuss-cdn.kde.org/uploads/default/original/2X/8/83a1ffee5fbb2ae33046c940ccba621bf0310ee5.jpeg)

---

<div class="post-metadata">

**Author:** ![asemke](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/asemke/32/22289_2.png) [@asemke](https://discuss.kde.org/u/asemke)\
**Post date:** [May 6, 2024, 3:50pm UTC](https://discuss.kde.org/t/entries-not-evaluated-when-using-python-notebook/15149/6 "2024-05-06T15:50:31Z")

</div>

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](http://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](https://discuss-cdn.kde.org/uploads/default/original/2X/f/f493067015bd40624a39be47548bfab2241f89e8.jpeg)

---

<div class="post-metadata">

**Author:** ![dean515](https://discuss-cdn.kde.org/letter_avatar_proxy/v4/letter/d/e79b87/32.png) [@dean515](https://discuss.kde.org/u/dean515)\
**Post date:** [May 6, 2024, 4:21pm UTC](https://discuss.kde.org/t/entries-not-evaluated-when-using-python-notebook/15149/7 "2024-05-06T16:21:45Z")

</div>

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

 ![labplot_PS_snip](https://discuss-cdn.kde.org/uploads/default/original/2X/4/4ba7af627d7ebc6a0233867db0cb52491d664f42.jpeg)

---

<div class="post-metadata">

**Author:** ![asemke](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/asemke/32/22289_2.png) [@asemke](https://discuss.kde.org/u/asemke)\
**Post date:** [May 6, 2024, 4:56pm UTC](https://discuss.kde.org/t/entries-not-evaluated-when-using-python-notebook/15149/8 "2024-05-06T16:56:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dean515](https://discuss-cdn.kde.org/letter_avatar_proxy/v4/letter/d/e79b87/32.png) [@dean515](https://discuss.kde.org/u/dean515)\
**Post date:** [May 6, 2024, 5:00pm UTC](https://discuss.kde.org/t/entries-not-evaluated-when-using-python-notebook/15149/9 "2024-05-06T17:00:23Z")

</div>

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 !

---

<div class="post-metadata">

**Author:** ![asemke](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/asemke/32/22289_2.png) [@asemke](https://discuss.kde.org/u/asemke)\
**Post date:** [May 6, 2024, 5:18pm UTC](https://discuss.kde.org/t/entries-not-evaluated-when-using-python-notebook/15149/10 "2024-05-06T17:18:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dean515](https://discuss-cdn.kde.org/letter_avatar_proxy/v4/letter/d/e79b87/32.png) [@dean515](https://discuss.kde.org/u/dean515)\
**Post date:** [May 7, 2024, 8:13am UTC](https://discuss.kde.org/t/entries-not-evaluated-when-using-python-notebook/15149/11 "2024-05-07T08:13:08Z")

</div>

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).
