[python-win32] Python Newbie Question
John Machin
sjmachin at lexicon.net
Fri Feb 24 00:48:28 CET 2006
On 24/02/2006 10:23 AM, Heang Lim wrote:
> I've been fiddling with the setup and it might have done more damage
> than good. The reason I'm using Python 2.3.5 is because of WindPySend
> DLL that I found on the net to do test automation and it does not
> support Python 2.4. Not yet at least. Due to this I'm being forced
> to use 2.3.5. Thanks for your feed back. I think I'm going to
> re-install Python instead of trying to fix it.
>
> HL
Re-installing sounds like a very good idea. Randomly perturbing the
setup and then ignoring warning messages is not a good idea.
"I'm using Python 2.3.5" is contradicted by your previous message
"Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)]
on win32". You may have TWO (or more!) installations of Python 2.3.
Remove ALL traces of ALL installations of Python 2.3 before re-installing.
Please don't top-post.
> On 2/23/06, John Machin <sjmachin at lexicon.net> wrote:
>
>>On 24/02/2006 3:02 AM, Heang Lim wrote:
>>
>>>Hello John,
>>>
>>>Here is the sys.path output:
>>>
>>>C:\\Apache2\htdocs>python
>>>'import site' failed; use -v for traceback
>>
>>Hmmm ... either (1) you get this all the time and you didn't think it
>>was worth doing anything about or worth mentioning when you asked your
>>question or (2) you have been fiddling about with your setup since
>>asking :-(
>>
>>So do what it says:
>>dos-prompt>python -v
>>
>>and tell us the output.
>>
>>
>>>Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32
>>>Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>>>>>import sys
>>>>>>sys.path
>>>
>>>['', 'c:\\Python23', 'C:\\Apache\\Apache2\\htdocs\\python23.zip',
>>
>>The second entry above is from your PYTHONPATH environment variable.
>>Note the capital P. This entry is not useful -- see the multiple
>>occurrences of c:\\python23 below -- and may be causing some confusion.
>>Get rid of it.
>>
>>The third entry is a mind-boggler. The remainder below is just weird.
>>Here's what a plain vanilla Python 2.3 installation gives on my machine:
>>
>>C:\junk>c:\python23\python
>>Python 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] on
>>win32
>>Type "help", "copyright", "credits" or "license" for more information.
>> >>> import sys
>> >>> sys.path
>>['', 'c:\\python23\\python23.zip', 'C:\\junk', 'c:\\python23\\DLLs',
>>'c:\\python23\\lib', 'c:\\python23\\lib\\plat-win',
>>'c:\\python23\\lib\\lib-tk', 'c:\\python23',
>>'c:\\python23\\lib\\site-packages']
>>
>>Why are you using Python 2.3 at all instead of 2.4? You are not so
>>constrained by Apache AFAICT. Why Python 2.3.3 and not 2.3.5??
>>
>>The general impression is that your Python installation is close to FUBAR.
>>
>>Did you install Python 2.3 in the usual manner? What fiddling about have
>>you been doing since?
>>
>>If you are trying to do mod_python with Apache under Windows, might it
>>not be better asking on the modpython mailing list?
>>
>>
>>>'c:\\python23', 'c:\\py
>>>thon23\\Lib\\site-packages\\DLLs', 'c:\\python23',
>>>'c:\\python23\\Lib\\site-packages\\lib
>>>', 'c:\\python23', 'c:\\python23\\Lib\\site-packages\\lib\\plat-win',
>>>'c:\\python23', 'c:
>>>\\python23\\Lib\\site-packages\\lib\\lib-tk', 'C:\\Apache\\Apache2\\htdocs']
>>>
>>>
>>>Thanks for your response to my email.
>>>
>>>HL
>>>
>>>On 2/22/06, John Machin <sjmachin at lexicon.net> wrote:
>>>
>>>
>>>>On 23/02/2006 11:53 AM, Heang Lim wrote:
>>>>
>>>>
>>>>>I've installed Python on my c:\python23 directory and Apache on my
>>>>>c:\Apache2 directory. On my DOS windows, I went to c:\Apache\htdocs
>>>>>directory and enter 'python' to go into the interactive mode. When I
>>>>>tried to import some modules such as 'import os' or 'import string', I
>>>>>was getting 'ImportError: no module named os', etc. Am I missing some
>>>>>sort of environment variable setting somewhere? I have my PYTHONPATH
>>>>>system variable set to 'c:\python23'.
>>
>>No you don't; see above.
>>
>>
>>
>>>>do this:
>>>>DOS-prompt>python
>>>>
>>>>
>>>>>>>import sys
>>>>>>>sys.path
>>>>
>>>>and show us the output (copy/paste).
>>>>
>>>>
>>>
>>>
>>>
>>
>
>
More information about the Python-win32
mailing list