Opened 4 years ago
Closed 4 years ago
#285 closed defect (fixed)
python error when multiple pythons installed
Reported by: | Brent Fraser | Owned by: | Jeff McKenna |
---|---|---|---|
Priority: | major | Milestone: | 4.0.5 release |
Component: | MS4W - Python | Version: | 4.0.4 |
Keywords: | Cc: | TC Haddad | |
Blocked By: | Blocking: |
Description
When using the "MS4W-Shell", typing "python" results in:
Fatal Python error: init_sys_streams: can't initialize sys standard streams Traceback (most recent call last): File "C:\Program Files\Python38\lib\io.py", line 54, in <module> ImportError: cannot import name 'open_code' from 'io' (unknown location)
This is due to my PYTHONHOME env variable being set to one of the other Python locations.
It would be nice if MS4W's setenv.bat would include:
set PYTHONHOME=C:\ms4w\Python
Change History (2)
comment:1 by , 4 years ago
Cc: | added |
---|---|
Component: | MS4W - Base → MS4W - Python |
comment:2 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I did much testing for this. What is now enabled for MS4W 4.0.5 release is that the default setenv.bat does include a commented line as:
REM set PYTHONHOME=\ms4w\Python
but the setup.exe installer will change that line to:
set PYTHONHOME=[the user's selected drive & folder]\ms4w\Python
I did not fully enable this setting for the .zip users, as I found that using '\ms4w\Python' without the drive letter caused conflicts and problems in testing. So (the super)-users of the .zip can modify the commented line when needed. It's more important to handle the installer users.
Thanks for the feedback!!!
Great enhancement, will add to 4.0.5 release