Hi,

Newbie to this python lark so please forgive any silly questions - thank!

Have installed various versions of python from 2.4 to 2.6 all with same issue.

Current install is 2.5.4 AMD64 on XP64 platform.

Python IDE doesn't do anything at all

Python command line reports
>> 'import site' failed; use -v for traceback

then I cannot seem to import anything (at the moment I am trying to import os - reports "no module name os")

Tried 3.1.1 - different error. Then I get runtime termination errors.

So I am stuck - have python script but no means of running it!! HELP PLEASE!!!

Thanks

Rob

Did you try python -v ? Please post the traceback between code tags http://www.daniweb.com/forums/announcement114-3.html.

Traceback is

#installing zipimport hook
import zipimport # builtin
# installed zipimport hook
'import site' failed; traceback:
ImportError: No module named site
Python 2.5.4 (r254:67916, Dec 23 2008, 15:19:34) [MSC v.1400 64 bit (AMD64)] on win32

BTW site.py resides in Lib directory

Thanks

Rob

Did you get the installer from here http://python.org/download/ ?

Yes I did. I have tried to re-install countless times also.....

Thanks


Rob

Never seen that on a fresh installation. Is it the same tracback if you uninstall everything and reinstall python 2.6 ?

Also, you should check if you don't have a bad python-related environment variable.

Never seen that on a fresh installation. Is it the same tracback if you uninstall everything and reinstall python 2.6 ?

Also, you should check if you don't have a bad python-related environment variable.

Gribouillis ur a genius!!

well I don't understand *how* this works, but in case anyone else has the same problem I'll (try to) explain my resolution.

(1) Go to the enivironment variables tab in Windows control panel
(2) CHANGE NOTHING
(3) hit OK

--> all works OK now.

Confused??? I am, but I am also happy as I can now run python. Have to follow the above procedure at each login to the system.

Thanks everyone for your help.

Rob

Gribouillis ur a genius!!

Have to follow the above procedure at each login to the system.

I know.

Consider upgrading to linux.

I know.

Consider upgrading to linux.

Trust me I would love to....I'm a unix man at heart but this project has to be on the dreaded windows platform......boo hoo.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.