* Alf P. Steinbach:
* Alf P. Steinbach:
Hi.
Or, to whomever this concerns... ;-)
I thought it would be prudent to install 3.1.1 for Windows from
scratch, so I uninstalled everything (CPython, ActivePython), and then
installed Python 3.1.1.
In the "Advanced" option I told the installer to compile packages.
The compiler then found a few syntax errors apparently in some text
conversion test programs, and finally a message box popped up saying
that "There is a problem with this Windows Installer Package",
http://imgur.com/N6Pbp
and the main installation dialog then reported "Python 3.1.1 installer
ended prematurely. [...] Your system has not been modified".
http://imgur.com/0kzMS.png
OK, I'll try again /without/ asking it to compile. I'm just reporting
this so that whoever needs to know knows (including maintainers and
people wanting to install this).
Hm, the installer forgot to clean up, leaving lots of files, so contrary
to the dialog's final message the system had been modified.
OK, after failing the Python 3.1.1 installer did manage to leave an uninstaller
for itself, and I ran that.
(1) Sluggish installer (about 600x slower than necessary)
What should be a simple removal of files and registry keys taking all of 1.5
seconds or so took about 10 minutes. I've experienced this before with
Microsoft's installer technology (MSI). Apparently it utilizes the infamuous
Microsoft "never use an O(n) algorithm where an O(n^2) or O(n^3) algorithm will
do on a sufficiently fast machine" strategy.
So I suggest switching to some other more light-weight installer technology.
(2) Failure to set up PATH.
Without asking the Python 3.1.1 installer to compile packages it now installed,
but it failed to set up the PATH environment variable (the ActivePython
installation also failed to do that, but I worked around it in my writings by
just not using the "python" command yet, referring to that in a footnote).
The installer did manage to do the rest of that part correctly: file
associations and PATHEXT variable.
In new command interpreter instance:
<example of="what the Python 3.1.1 installer did manage to do correctly">
C:\Documents and Settings\Alf> echo %pathext%
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.CJS;.JS;.JSE;.WSF;.WSH;.RB;.RBW;.tcl;.py;.pyw
C:\Documents and Settings\Alf> assoc | find /i "pyt"
.py=Python.File
.pyc=Python.CompiledFile
.pyo=Python.CompiledFile
.pyw=Python.NoConFile
C:\Documents and Settings\Alf> ftype | find /i "pyt"
Python.CompiledFile="C:\Program Files\cpython\python31\python.exe" "%1" %*
Python.File="C:\Program Files\cpython\python31\python.exe" "%1" %*
Python.NoConFile="C:\Program Files\cpython\python31\pythonw.exe" "%1" %*
</example>
(3) Tkinter not bundled, misleading & incomplete documentation.
With the file associations in place (the installer managed to do that) running
console programs works fine.
However, running Tkinter based programs does *not* work:
<code filename="ellipse.pyw">
import Tkinter
window = Tkinter.Tk()
window.title( "A fixed size ellipse..." )
window.geometry( "350x200" ) # Client area size, not window size.
window.resizable( width = 0, height = 0 )
canvas = Tkinter.Canvas( window, bg = "white" )
bbox = 2, 2, 347, 197 # Pixel coors left, top, right, bottom
canvas.create_oval( *bbox, fill = "PeachPuff" )
canvas.pack() # Fill the entire client area, please.
window.mainloop() # Process events until window is closed.
</code>
<example of="Tkinter does not work after installation">
C:\Documents and Settings\Alf> python ellipse.pyw
'python' is not recognized as an internal or external command,
operable program or batch file.
C:\Documents and Settings\Alf> "C:\Program Files\cpython\python31\python.exe"
ellipse.pyw
Traceback (most recent call last):
File "ellipse.pyw", line 1, in <module>
import Tkinter
ImportError: No module named Tkinter
</example>
Even after setting up a correct PATH Tkinter does not work:
<example of="Tkinter doesn't work even with correct PATH">
C:\Documents and Settings\Alf> set path=%path%;C:\Program Files\cpython\python31
C:\Documents and Settings\Alf> python ellipse.pyw
Traceback (most recent call last):
File "ellipse.pyw", line 1, in <module>
import Tkinter
ImportError: No module named Tkinter
</example>
Checking I find that while there is a Tkinter folder there is no file
[Tkinter.py] in this installation, i.e. the Tkinter module is not bundled with
this distribution.
That's bad news for any novice wanting to start learning the language: a main
"battery" is missing! The documentation gives the impression that Tkinter can
just be used, and it could just be used with ActivePython. Here the novice has
to figure out not only that it isn't there, but also how to get it!
Checking <url: http://pypi.python.org/pypi/>, the package index, nope, no
Tkinter there.
Typing "tkinter" in the Firefox address bar leads to <url:
http://wiki.python.org/moin/TkInter>, and it has a recipe for checking for
Tkinter support/installation:
<checking results>
Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import _tkinter
>>> import Tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named Tkinter
>>>
</checking results>
The recipe now calls for adding path to directory with [Tkinter.py], but as
mentioned no such file in this installation...
Cheers,
- Alf
PS: This was not unexpected. It was exactly why I earlier didn't even look at
CPython (umpteen bad experiences with *nix ports) but used ActivePython. I'm
hopeful that I will find where Tkinter resides on the net, but hey, it should at
least be documented, up front I mean (it's possibly mentioned somewhere, yes?).
--
http://mail.python.org/mailman/listinfo/python-list