|
From: Debbie C. <deb...@nc...> - 2005-07-08 15:18:18
|
Hello,
I noticed in reading the list archives that a few people mentioned an
installation problem with VPython under Windows. I encountered this
while trying to automate the installs for widespread distribution, and I
have found the cause and have some workarounds.
I'm sorry for the length of this post but I wanted to be sure there's
enough detail for folks to be sure they are seeing the same problem
before trying the workarounds.
---
VPython depends on Python. The current version of VPython (2.4-3.22b)
depends on Python 2.4.1.
There are problems with both the Python installer and the VPython installer.
Python installer issue
------------------------
The real problem is with the Python 2.4.1 installer. Python will put the
InstallPath registry setting (which indicates where Python is installed)
under HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE under some
circumstances:
(1) if you are not a member of the Administrators group
(2) if you choose "Install for Just Me" rather than "Install for All
Users",
(3) if you automate the Python install using "msiexec.exe /i
python-2.4.1.msi /q". The /q (quiet) switch causes different behavior
than the defaults with a manual install ("msiexec.exe /i python-2.4.1.msi").
This is a mistake in the Python installer. The path to an installed
application always belongs under HKLM, because the path to installed
software is a machine-specific setting. If the path is in HKCU, the
InstallPath setting can follow a user to a machine where Python is not
installed.
VPython installer issue
------------------------
The VPython installer looks for the path to Python. The installer *only*
looks in HKEY_LOCAL_MACHINE for the InstallPath (specifically,
HKLM\Software\Python\PythonCore\2.4\InstallPath). This is a reasonable
assumption, but doesn't actually work with the Python installer.
The problem is that the VPython installer does not gracefully handle the
situation in which it cannot find the InstallPath for Python, such as
when the InstallPath is in HKEY_CURRENT_USER (see "What it looks like
when things go wront installing VPython" below). The VPython installer
prompts for the path to Python, and then does not seem to be able use it.
This will result in the following scenario when you try to run the
VPython installer:
What it looks like when things go wrong installing VPython
--------------------------------------------------------------------
1. Start the VPython Installer. Under Windows XP Service Pack 2, you'll
be prompted by Windows to run the app because it's from an "Unknown
Publisher". Click Run.
(It would be helpful if the installer were digitally signed, or if the
publisher were not Unknown. But in the interim I've written a little
helper called DoRunRun that can be downloaded from
http://www.novell.com/coolsolutions/tools/15465.html/ for anyone
interested in automating the installation.)
2. Click Next to get started. An error message appears. Setup is the
title, and the text says "Could not locate where Python 2.4 is
installed. You will be asked where to install the VPython extensions."
Click OK.
3. The dialog box says "Setup will install VPython for Python 2.4 into
the following folder." However, no folder is listed. You are prompted
for a location. You might try manually entering or browsing to
C:\Python24 or C:\Python24\.
4. Then there is a second error message, identical to the first. Setup
is the title, and the text says "Could not locate where Python 2.4 is
installed. You will be asked where to install the VPython extensions."
Click OK.
5. You are at the Select Components dialog. Accept the defaults for a
full install and click Next.
6. Then the Additional Tasks dialog appears. Accept the defaults and
click Next.
7. You are at the Ready to Install dialog. Click Install. Now you get
the final error message. The title is Error, and the text is "You must
enter a folder name." Click OK. The installer quits without installing
VPython.
Workarounds
------------
There are three workarounds. All require installing or reinstalling Python.
(1) Easiest:
Uninstall Python, and reinstall it as Administrator. Choose the "Install
for All Users" option. You should then be able to install VPython.
(2) Registry hack:
Manually add both of the following in the registry entries (string values):
HKEY_LOCAL_MACHINE\Software\Python\PythonCore\2.4\InstallPath\@="C:\Python24"
HKEY_LOCAL_MACHINE\Software\Python\PythonCore\2.4\InstallPath\InstallGroup\@="Python
2.4"
Note: @ is the (Default) value.
This is the minimum to get through the VPython install. You should make
sure that you get all the Python registry settings, really. You'd
probably want to duplicate everything under
HKEY_CURRENT_USER\Software\Python in HKEY_LOCAL_MACHINE. The settings
under that key really belong under HKLM, not HKCU.
(3) How to make a silent install of Python that puts its InstallPath
settings in HKLM rather than HKCU:
Specify a property on the command line so that the application is
installed for all users. Here's how (case DOES matter):
"msiexec.exe /i python-2.4.1.msi ALLUSERS=1 /q"
Regards,
Debbie Carraway
--
Debbie Carraway
Asst. Director, Microcomputer Systems
Information Technology Division, NC State University
Voice: 919.515.5498 AIM: DeborahCarraway
|