Importerror no module named WIN32API

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matt Smith

    Importerror no module named WIN32API

    hi all, again....

    having another problem with python COMs, I run a python script on a
    win2000 machine, that uses win32com.client and it runs perfectly,
    whereas when I come to run it on a win98 machine (the machine that the
    code, when completed, will be running from in the future) it returns
    the error:

    Traceback (most recent call last):
    File "firsttry.p y", line 1, in ?
    import helloworld
    File "G:\msmith\pyth on\helloworld.p y", line 2, in ?
    import win32com
    File "C:\PYTHON23\li b\site-packages\win32c om\__init__.py" , line 5,
    in ?
    import win32api, sys
    ImportError: No module named win32api

    Any clues as to how to rectify this problem would be greatly
    appreciated

    cheers,
    matt.
  • Matt Smith

    #2
    Re: Importerror no module named WIN32API

    Joe Francia <usenet@soraia. com> wrote in message news:<ggSZa.212 8117$ZC.312674@ news.easynews.c om>...[color=blue]
    > Matt Smith wrote:
    >[color=green]
    > > hi all, again....
    > >
    > > having another problem with python COMs, I run a python script on a
    > > win2000 machine, that uses win32com.client and it runs perfectly,
    > > whereas when I come to run it on a win98 machine (the machine that the
    > > code, when completed, will be running from in the future) it returns
    > > the error:
    > >
    > > Traceback (most recent call last):
    > > File "firsttry.p y", line 1, in ?
    > > import helloworld
    > > File "G:\msmith\pyth on\helloworld.p y", line 2, in ?
    > > import win32com
    > > File "C:\PYTHON23\li b\site-packages\win32c om\__init__.py" , line 5,
    > > in ?
    > > import win32api, sys
    > > ImportError: No module named win32api
    > >
    > > Any clues as to how to rectify this problem would be greatly
    > > appreciated
    > >
    > > cheers,
    > > matt.[/color]
    >
    > Maybe you need to install the win32all extensions on the Win98 machine?
    > http://starship.python.net/crew/mhammond/
    >
    > jf[/color]

    jf was that supposed to be funny ?

    no i would like a serious answer to this problem, as it is seriously hampering
    my current project.

    cheers,
    matt

    Comment

    • Fredrik Lundh

      #3
      Re: Importerror no module named WIN32API

      Matt Smith wrote:
      [color=blue][color=green][color=darkred]
      > > > ImportError: No module named win32api
      > > >
      > > > Any clues as to how to rectify this problem would be greatly
      > > > appreciated[/color]
      > >
      > > Maybe you need to install the win32all extensions on the Win98 machine?
      > > http://starship.python.net/crew/mhammond/[/color]
      >
      > jf was that supposed to be funny ?
      >
      > no i would like a serious answer to this problem, as it is seriously hampering
      > my current project.[/color]

      have you checked the "Installati on Problems" page (available via the funny
      link)?



      have you checked that win32api is installed, and that python is picking up
      the right win32api version? have you checked the python path? have you
      traced the imports (use "python -v" or "python -vv" to run the program)?
      if win32api exists, what happens if you import it from the python prompt?
      are all DLLs that win32api depends upon available on your machine (google
      for DLL dependency checkers, or use "dumpbin /imports" to check what it
      relies on). etc.

      </F>




      Comment

      • Matt Smith

        #4
        Re: Importerror no module named WIN32API

        Thanks for the ehlp, it was the pythonpath or rather the lack of one
        that was causing me difficulties,

        thanks again,
        matt

        Comment

        Working...