PyScript 3.0 doesn't seem save changes to Tools\Python Path and comply with searching for tha latest python version installed when running "PyScripter (Latest Python Version)".

206 views
Skip to first unread message

João Matos

unread,
Oct 21, 2017, 8:11:00 AM10/21/17
to PyScripter
Hello,

I'm trying PyScripter 3.0 with Python 3.5.4 32b.

I have also installed Python 2.7, although it is not in DOS PATH env var.

When I run PyScripter (Latest Python Version) it doesn't use the installed and on DOS PATH Python version 3.5.4. It always assumes Python 2.7.
If I try to change it using Tools\Python Path it doesn't seem to work, because the Interpreter windows keep running Py2.7. If I close it and restart it the changes are gone and it keeps running Py2.7.

The only way I was able to solve it was an oldie from previous versions of PyScripter. I created a reg file with this content:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Python]

[HKEY_CURRENT_USER\Software\Python\PythonCore]

[HKEY_CURRENT_USER\Software\Python\PythonCore\3.5]

[HKEY_CURRENT_USER\Software\Python\PythonCore\3.5\Help]

[HKEY_CURRENT_USER\Software\Python\PythonCore\3.5\Help\Main Python Documentation]
@="C:\\Python354-32\\Doc\\python3.5.4.chm"

[HKEY_CURRENT_USER\Software\Python\PythonCore\3.5\InstallPath]
@="C:\\Python354-32"

[HKEY_CURRENT_USER\Software\Python\PythonCore\3.5\InstallPath\InstallGroup]
@="Python 3.5"

[HKEY_CURRENT_USER\Software\Python\PythonCore\3.5\Modules]
@=""

[HKEY_CURRENT_USER\Software\Python\PythonCore\3.5\PythonPath]
@="C:\\Python354-32\\Lib;C:\\Python354-32\\DLLs"


Run it and then PyScripter assumed the correct Python version and paths.

Best regards,

JM

Kiriakos Vlahos

unread,
Oct 21, 2017, 3:03:05 PM10/21/17
to pyscr...@googlegroups.com
Hi Joao,

Go to the command prompt and try

PyScripter --PYTHON35

Does this load python 3.5?  If it does create a shortcut to run PyScripter with 3.5.   I assume you are using the 32 bit version of PyScripter to match you Python 3.5 32 bit.

Hope this helps.

Regards

Kiriakos

--
You received this message because you are subscribed to the Google Groups "PyScripter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyscripter+unsubscribe@googlegroups.com.
To post to this group, send email to pyscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/pyscripter.
For more options, visit https://groups.google.com/d/optout.

João Matos

unread,
Oct 21, 2017, 4:47:50 PM10/21/17
to pyscr...@googlegroups.com, Kiriakos Vlahos

Hello,

Your command only works if I maintain teh registry key I added (mentioned on my previous email).

If I remove the registry key, PyScripter doesn't even start, returning an error "Python could not be properly initialized. We must quit.".

Either on the command line using --PYTHON35 or the GUI.


If I add the registry key, everything works as I mentioned on my previous email.

Python 3.5.4 is always on the path "Path=C:\Python354-32\Scripts\;C:\Python354-32\;".


Best regards,

JM

You received this message because you are subscribed to a topic in the Google Groups "PyScripter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyscripter/FRTLYMcXfwo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyscripter+...@googlegroups.com.

Colin J. Williams

unread,
Oct 21, 2017, 5:16:20 PM10/21/17
to PyScripter
João,

I use 2.7.14 and 3.6.3.  It's along time since I've edited the Registry and so I would be grateful if you could tell me what entries I should make.

Many thanks,

Colin W.

João Matos

unread,
Oct 21, 2017, 5:53:41 PM10/21/17
to pyscr...@googlegroups.com, Colin J. Williams

Hello,

I don't know if it works with both at the same time (check pep 514) but assuming yes, just replace all my entries that have  \3.5 with \3.6 and @="Python 3.5" into @="Python 3.6" (and correct all paths to your environment).

The same procedure applies to 2.7.

Best regards,


JM

PyScripter

unread,
Oct 22, 2017, 6:11:06 AM10/22/17
to PyScripter
There is no need to edit the registry.

If you have installed a standard version of Python from Python.org, its installation program registers Python in LOCAL MACHINE\Software for "All Users" installations and in CURRENT USER\Sofware for single user installations.  PyScripter makes use of that information to load the appropriate version of Python.

If you use an unregistered Python version, then you still do not need to edit the registry.  See how at https://github.com/pyscripter/pyscripter/wiki/FAQ#how-do-i-use-pyscripter-with-an-unregistered-version-of-python-eg-winpython




João Matos

unread,
Oct 22, 2017, 7:00:10 AM10/22/17
to PyScripter, PyScripter
Hello,

Thanks for the info about the unregistered Python, but that is not my case.

I installed the standard Python 3.5.4 32b from python.org (a.k.a. CPython) for all users and checked that the registry key was created in HKLM. But PyScripter 3.0 didn't work correctly until I created the HKCU key.

Best regards,

JM

João Matos

unread,
Oct 22, 2017, 7:27:52 AM10/22/17
to PyScripter
Hello,

I forgot to say in my last email that the registry key the standard Python created (and I checked) in my registry was HKLM\Software\Wow6432Node\Python and not HKLM\Software\Python.
My Windows is 64b and my Python is 32b.

Thanks,

JM

--
You received this message because you are subscribed to a topic in the Google Groups "PyScripter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyscripter/FRTLYMcXfwo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyscripter+unsubscribe@googlegroups.com.

PyScripter

unread,
Oct 22, 2017, 11:32:15 AM10/22/17
to PyScripter
This is to be expected.

"The Wow6432Node registry entry indicates that you are running a 64-bit Windows version. The operating system uses this key to display a separate view of HKEY_LOCAL_MACHINE\SOFTWARE for 32-bit applications that run on 64-bit Windows versions."

PyScripter 32 bit would still see that as HKLM\Software\Python and load the python correctly


On Sunday, October 22, 2017 at 2:27:52 PM UTC+3, João Matos wrote:
Hello,

I forgot to say in my last email that the registry key the standard Python created (and I checked) in my registry was HKLM\Software\Wow6432Node\Python and not HKLM\Software\Python.
My Windows is 64b and my Python is 32b.

Thanks,

JM

PyScripter

unread,
Oct 22, 2017, 4:50:42 PM10/22/17
to PyScripter
Just a summary:

To use PyScripter 32 bit with python 32 bit:
-  Download and install a Python 32 bit distribution from www.python.org
-  PyScriper should work with the installed python 32bit without any issues.


To use PyScripter 64 bit with python 64 bit on a Windows 64 bit machine:
-  Download and install a Python 64 bit distribution from www.python.org
-  PyScriper should work with the installed python 64bit without any issues.

João Matos

unread,
Oct 23, 2017, 7:56:03 AM10/23/17
to pyscr...@googlegroups.com, PyScripter
Hello,

On my 1st email I forgot to mention that I had a Python 2.7 installed. That should not matter when I select Last Python Version or the --PYTHON35 command line arg. After removing the Python 2.7, PyScripter didn't start, giving the error "Python could not be properly initialized. We must quit.".
The solution to both problems (the one mentioned on the 1st email and this one that I forgot to mention, was the same, adding the reg key I mentioned on my first email).

However, to be sure, I did the following test on my Windows 8.1 x64:

I uninstalled Python 3.5.4 32b and PyScripter 3.0.1 32b.
I rebooted.
There is no Python 2.7 (ot any other version) installed at this point.
I checked the registry that there weren't any Python keys in HKCU\Software, HKCU\Software\Wow6432Node, HKLM\Software and HKLM\Software\Wow6432Node.
I checked that there weren't any PyScripter or Python directories in C:\Program Files and C:\Program Files (x86).
I checked that there wasn't any c:\Python354-32 dir.
I checked that there weren't any PyScripter or Python directories in C:\ProgramData.
I deleted %APPDATA%\PyScripter dir. There was no Python dir in there.
I checked that there wasn't any Python or PyScripter dirs in %APPDATA%\..\Local and %APPDATA%\..\LocalLow.

I installed Python 3.5.4 32b (No launcher, add to path activated, customize install, all users, no python test suite, dest dir c:\Python354-32). And yes it is from python.org.
I checked that it created the HKLM\Software\Wow6432Node entry and that "C:\Python354-32\Scripts\;C:\Python354-32\" was added to PATH env var.
On the command line if I tried python and it launched Python 3.5.4 console.

I installed PyScripter 3.0.1 32b.

I run PyScripter (Latest Python Version) and it returned an error "Python could not be properly initialized. We must quit.".

I tried running PyScripter from the command line, in it's own dir, with pyscripter --PYTHON35, with the same result.

I rebooted and checked both GUI and command line, both failed with the same error.

I added the reg key I mentioned on my 1st email and PyScripter run without a problem and filled the correct entries in Tools\Python Path.


Best regards,

JM
--
You received this message because you are subscribed to a topic in the Google Groups "PyScripter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyscripter/FRTLYMcXfwo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyscripter+...@googlegroups.com.

PyScripter

unread,
Oct 23, 2017, 8:32:18 AM10/23/17
to PyScripter
Well I was wrong!  There was a breaking change starting from Python 3.5 whereby the registry info is now stored in a key 3.5-32.  This affects the automatic discovery of Python 32 bit 3.5 and 3.6 .  I will provide a fix later today in PyScripter 3.0.2.

João Matos

unread,
Oct 23, 2017, 8:45:01 AM10/23/17
to pyscr...@googlegroups.com, PyScripter
Hello,

Thanks for the feedback and for the great product and support.
It was my favourite IDE in Py2.7 and now I'm trying it out to be for Py3.

Best regards,

JM
--
You received this message because you are subscribed to a topic in the Google Groups "PyScripter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyscripter/FRTLYMcXfwo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyscripter+...@googlegroups.com.

PyScripter

unread,
Oct 23, 2017, 9:45:52 PM10/23/17
to PyScripter
Python 3.0.2 is out and it should discover and use 32 bit Python v3.5 and v3.6 without problems now. So, (hopefully...)


To use PyScripter 32 bit with python 32 bit:
-  Download and install a Python 32 bit distribution from www.python.org
-  Download and install PyScripter-v3.0.2-Setup.exe from https://sourceforge.net/projects/pyscripter/files/PyScripter-v3.0/
-  PyScriper should work with the installed python 32bit without any issues.


To use PyScripter 64 bit with python 64 bit on a Windows 64 bit machine:
-  Download and install a Python 64 bit distribution from www.python.org
-  Download and install PyScripter-v3.0.2-x64-Setup.exe from https://sourceforge.net/projects/pyscripter/files/PyScripter-v3.0/

João Matos

unread,
Oct 24, 2017, 3:54:52 AM10/24/17
to pyscr...@googlegroups.com, PyScripter
Hello,

Thanks.

Best regards,

JM
Reply all
Reply to author
Forward
0 new messages