"The Python engine is not properly initialized."

110 views
Skip to first unread message

Eddy

unread,
Oct 31, 2024, 5:51:43 PM10/31/24
to PyScripter
The last few Pyscripter versions give me this error.
I was hoping that the current V 5.1.1.0 would solve it, but the error message remains.

I tried uninstalling, then re-installing. 
I tried the 'portable' version, but to no avail.

I am using Windows 10.
I have Python 3.12 installed for Windows in general.
I use Conda environments for my projects.
Pyscripter says I have 2 registered versions: Python 3.12 and 3.10.
I also have 2 unregisterd versions, Python 3.10 in 2 Conda environments.

Any suggestions to what I can try to get rid of this error message?





PyScripter

unread,
Oct 31, 2024, 5:58:08 PM10/31/24
to PyScripter
The first thing to check is that the bitness of PyScripter and Python match.:

The 64-bit version of PyScripter (x64) works only on 64-bit Windows **and** with 64-bit versions of Python. The 32-bit version (x86) of PyScripter works on both 32-bit and 64-bit Windows with 32-bit versions of Python.

Then from PyScripter do Run, Python Versions, Setup Python versions.

Press the second button (+)  and select the root directory of you python installation you want to use.  Do you get an error message?
If not press the first button to activate this version.

PyScripter

unread,
Oct 31, 2024, 5:59:46 PM10/31/24
to PyScripter
Just to clarify, if you want to use a Conda environment, then select the root directory of that environment.

Eddy

unread,
Oct 31, 2024, 6:11:04 PM10/31/24
to PyScripter
I installed "PyScripter-5.1.1-x64-Setup.exe".
Python 3.12 and 3.10 are the 64-bit versions. My Windows 10 is 64-bit.

I am using the (mini)conda root directories.
These are the versions:  https://prnt.sc/nGNq_l7IJIq8


Op donderdag 31 oktober 2024 om 22:59:46 UTC+1 schreef PyScripter:

PyScripter

unread,
Oct 31, 2024, 6:30:59 PM10/31/24
to PyScripter
So it appears that python 3.12 is active.
  • Is python 3.12 working ok?
  • Is the registered Conda 3.10 working correctly?
  • Do you have issues with just the environments?

Eddy

unread,
Oct 31, 2024, 6:43:32 PM10/31/24
to PyScripter
I can run a simple testprogram in all 4 versions, IF I do 'Run / External Run'.
If I do 'Run / Run', there is no output to the Python Interpreter window, so I can't tell if the program (script) is running.
If I do 'Run / Syntax Check' I get error message "The internal Python interpreter is not available."

When I switch Python Versions, I always get the above error "The Python engine is not properly initialized."
I also get this error when I want to close PyScripter. In fact, I am unable to close PyScripter. I have to 'End Task' it in Task Manager ...
When I do 'Tools / Python Path' I also get the 'not properly initialized' error .....

Not sure what I still can try ....

Op donderdag 31 oktober 2024 om 23:30:59 UTC+1 schreef PyScripter:

PyScripter

unread,
Oct 31, 2024, 7:03:40 PM10/31/24
to PyScripter
I can confirm that there are issues with miniconda 3.10.  I will investigate.
But miniconda 3.11 works fine.

Eddy

unread,
Oct 31, 2024, 7:08:09 PM10/31/24
to PyScripter
Thanks for looking into this.

The thing is, from the Python Versions, I can remove the 'Unregistered Versions', but not the 'Registered Versions'.
To remove one of these, I assume I have to completely uninstall that Python version (3.10 in this case) ?
This would also mean I  have to remove and re-setup my (mini)conda 3.10 envs .... 


Op vrijdag 1 november 2024 om 00:03:40 UTC+1 schreef PyScripter:

PyScripter

unread,
Oct 31, 2024, 7:19:05 PM10/31/24
to PyScripter
Actually you don't need to uninstall anything.  See  How to change Python version of existing conda virtual environment? - Stack Overflow.

You just need to activate your environment from a command prompt and issue the command
conda install python=3.11

You can do that for you base installation of miniconda.
I have also tested upgrading miniconda to 3.12 an that also works fine.

PyScripter

unread,
Oct 31, 2024, 7:20:48 PM10/31/24
to PyScripter
Python 3.10 from python.og also works fine.  I am not sure what the issue is with miniconda 3.10.

Eddy

unread,
Oct 31, 2024, 7:23:26 PM10/31/24
to PyScripter
Thanks. I didn't know this!
I will try this with my miniconda base environment. This is one of the 'Registered' Python Versions ....
See what happens ....


Op vrijdag 1 november 2024 om 00:19:05 UTC+1 schreef PyScripter:

Eddy

unread,
Oct 31, 2024, 7:45:32 PM10/31/24
to PyScripter
I upgraded miniconda base env to python 3.11.
But I don't see much improvement. The error message remains.
This error still prevents me to close PyScripter.

Also weird that the Python Versions window list my miniconda base env still as '3.10'. If I do 'Test Selected Python version', the python interpreter shown is 3.11.
See screenshot   https://app2.sharemyimage.com/2024/11/01/pyscripter2.png
I removed the 2 Unregistered 3.10 envs as the screenshot shows.
That doesn't seem to make a difference.


Op vrijdag 1 november 2024 om 00:23:26 UTC+1 schreef Eddy:

PyScripter

unread,
Oct 31, 2024, 7:51:12 PM10/31/24
to PyScripter
So C:\Users\eva\Miniconda3 contains python 3.11?
Could you please add this directory as an unregistered version and try to activate it?  I suspect the registry information is not correct after the upgrade.

PyScripter

unread,
Oct 31, 2024, 7:52:47 PM10/31/24
to PyScripter
This is what I did here and it worked fine.

Eddy

unread,
Oct 31, 2024, 7:58:01 PM10/31/24
to PyScripter
When I add as Unregistered, it shows as '3.11' but unfortunately, the error message persists .....
https://app2.sharemyimage.com/2024/11/01/pyscripter3.png


Op vrijdag 1 november 2024 om 00:52:47 UTC+1 schreef PyScripter:

Eddy

unread,
Oct 31, 2024, 8:03:51 PM10/31/24
to PyScripter
Also the PyScripter Python Interpreter does 'nothing'  when I type commands in it:


Op vrijdag 1 november 2024 om 00:58:01 UTC+1 schreef Eddy:

PyScripter

unread,
Oct 31, 2024, 8:04:11 PM10/31/24
to PyScripter

Screenshot 2024-11-01 020001.png

Strange.  In the picture I am switching  between
  • python 3.10 from python.org
  • miniconda 3.11 (upgraded from 3.10) setup as unregistered
  • miniconda 3.12 fresh install   setup as unregistered
Could you please try a fresh miniconda say 3.12.

Eddy

unread,
Oct 31, 2024, 8:24:05 PM10/31/24
to PyScripter
I set up a new miniconda env 'py312'
I also uninstalled and re-installed PyScripter.
But I see no difference. Sorry ...

Op vrijdag 1 november 2024 om 01:04:11 UTC+1 schreef PyScripter:

PyScripter

unread,
Oct 31, 2024, 8:33:51 PM10/31/24
to PyScripter
Screenshot 2024-11-01 023231.png
I have also tried with an environment test created.  Also works fine here.

Eddy

unread,
Oct 31, 2024, 8:38:29 PM10/31/24
to PyScripter
It must be something specific to my computer then.
Probably the Windows Registry messed up somewhere ..
I will have a look at it tomorrow.
Do you perhaps have any suggestions to clean up the Registry from some of PyScripters Registry Keys?
Some keys to remove?


Op vrijdag 1 november 2024 om 01:33:51 UTC+1 schreef PyScripter:

PyScripter

unread,
Oct 31, 2024, 8:39:41 PM10/31/24
to PyScripter
When you uninstall PyScripter everything is cleaned up.

EddyV

unread,
Nov 6, 2024, 7:44:48 AM11/6/24
to PyScripter
After giving this a rest for a while, I tried running PyScripter (the portable version) as administrator.
No difference. 
Too bad I am not able to use PyScripter anymore.

Op vrijdag 1 november 2024 om 01:39:41 UTC+1 schreef PyScripter:
Reply all
Reply to author
Forward
0 new messages