faqts : Computers : Programming : Languages : Python : Installation and Configuration

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 2 people (50%) answered Yes

Entry

When I start Python 1.5.2, I get the error: Built-in exception class not found: EnvironmentError. Library mismatch?" Any ideas on solving this?

Aug 21st, 2000 21:58
unknown unknown, Michele Chen, Michael Dyck


I got this message just yesterday when I tried to run my newly-
installed Python 1.6b1 (except that the missing exception class was
"UnboundLocalError" rather than "EnvironmentError").
The problem was that my autoexec.bat file was still initializing
environment variables [not sure what the proper Windows term is]
for Python 1.5.2. (I think PYTHONPATH was the main culprit.)
So if you're on Windows, I suggest looking in C:\AUTOEXEC.BAT for
references to a previous Python installation, and either remove them,
or comment them out with a "rem". I think you'll have to restart
Windows for it to take effect.
If you're on Unix, you might be setting PYTHON* variables in your shell
start-up file (~/.cshrc, ~/.bashrc, etc). Remove them, or comment
them out with a "#".