Py2exe and Module Error...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vincehofmeister@gmail.com

    #1

    Py2exe and Module Error...

    Hey everyone:

    I am using py2exe and everything is working fine except one module,
    ClientCookie, found here:



    Keeps coming up as not found no matter what I do. I have tried all
    these combinations from the command line:

    python run.py py2exe - Results in "following modules appear to be
    missing" [ClientCookie]

    python run.py py2exe -p ClientCookie - Results in "No module named
    ClientCookie"

    python run.py py2exe -i ClientCookie - Results in "No module named
    ClientCookie"


    Ok, so that wasn't the problem I guess so now I try two different
    combinations of the run.py file... they look like this:

    #!/usr/bin/env python

    from distutils.core import setup
    import py2exe

    #setup(windows=['C:\\exe\\new_p ound.py']);
    setup(windows=[{"script" : "C:\\exe\\pos_f inal2.py"}],
    options={"py2ex e" : {"includes" : ["sip"]}})

    ^this just gives me the standard "following modules appear to be
    missing" [ClientCookie]



    #!/usr/bin/env python

    from distutils.core import setup
    import py2exe

    #setup(windows=['C:\\exe\\new_p ound.py']);
    setup(windows=[{"script" : "C:\\exe\\pos_f inal2.py"}],
    options={"py2ex e" : {"includes" : ["sip", "ClientCook ie"]}})

    ^this gives the error "No module named ClientCookie


    Ok so I am really in a crunch and have no idea what to do. Any help
    would be GREATLY appreciated.

    Vince

    P.S. I know ClientCookie is a branch of mechanize, but I don't
    understand how it runs fine on my machine using import ClientCookie
    and then when using py2exe it doesn't find it. I have tried from
    mechanize import ClientCookie and many alternatives but none of those
    work on importing the ClientCookie module normally without py2exe.




  • Gabriel Genellina

    #2
    Re: Py2exe and Module Error...

    En Wed, 22 Oct 2008 20:34:39 -0200, <vincehofmeiste r@gmail.comescr ibió:
    I am using py2exe and everything is working fine except one module,
    ClientCookie, found here:
    >

    >
    Keeps coming up as not found no matter what I do. I have tried all
    these combinations from the command line:
    Add `import ClientCookie` to your setup.py (to make sure you actually
    *can* import it in your development environment).
    Also declare it as a required *package* (not module):

    setup(windows=["C:\\exe\\pos_f inal2.py"],
    ...
    options={'py2ex e': {
    'packages': ['ClientCookie',]
    })

    --
    Gabriel Genellina

    Comment

    • vincehofmeister@gmail.com

      #3
      Re: Py2exe and Module Error...

      On Oct 22, 8:33 pm, "Gabriel Genellina" <gagsl-...@yahoo.com.a r>
      wrote:
      En Wed, 22 Oct 2008 20:34:39 -0200, <vincehofmeis.. .@gmail.comescr ibió:
      >
      I am using py2exe and everything is working fine except one module,
      ClientCookie, found here:
      >>
      Keeps coming up as not found no matter what I do. I have tried all
      these combinations from the command line:
      >
      Add `import ClientCookie` to your setup.py (to make sure you actually
      *can* import it in your development environment).
      Also declare it as a required *package* (not module):
      >
      setup(windows=["C:\\exe\\pos_f inal2.py"],
      ...
      options={'py2ex e': {
      'packages': ['ClientCookie',]
      })
      >
      --
      Gabriel Genellina
      Ok, thank you for your reply Gabriel. I did as you said, including
      adding 'import ClientCookie' to setup.py and that worked fine when
      running the script it found it. However, when actually running it
      through py2exe after adding the package as you have said, it still
      says 'No module named ClientCookie'

      Any help would be greatly appreciated.

      Vince

      Comment

      • Gabriel Genellina

        #4
        Re: Py2exe and Module Error...

        En Thu, 23 Oct 2008 20:02:41 -0200, <vincehofmeiste r@gmail.comescr ibió:
        On Oct 22, 8:33 pm, "Gabriel Genellina" <gagsl-...@yahoo.com.a r>
        wrote:
        >En Wed, 22 Oct 2008 20:34:39 -0200, <vincehofmeis.. .@gmail.com>
        >escribió:
        >>
        I am using py2exe and everything is working fine except one module,
        ClientCookie, found here:
        >>>>
        Keeps coming up as not found no matter what I do. I have tried all
        these combinations from the command line:
        Ok, thank you for your reply Gabriel. I did as you said, including
        adding 'import ClientCookie' to setup.py and that worked fine when
        running the script it found it. However, when actually running it
        through py2exe after adding the package as you have said, it still
        says 'No module named ClientCookie'
        >
        Any help would be greatly appreciated.
        Sorry, I can not give further general advice. This seems to be something
        specific to ClientCookie - try any forum devoted to the package, or ask
        the author directly.

        --
        Gabriel Genellina

        Comment

        • Mike Driscoll

          #5
          Re: Py2exe and Module Error...

          On Oct 23, 5:02 pm, vincehofmeis... @gmail.com wrote:
          On Oct 22, 8:33 pm, "Gabriel Genellina" <gagsl-...@yahoo.com.a r>
          wrote:
          >
          >
          >
          En Wed, 22 Oct 2008 20:34:39 -0200, <vincehofmeis.. .@gmail.comescr ibió:
          >
          I am using py2exe and everything is working fine except one module,
          ClientCookie, found here:
          >>
          Keeps coming up as not found no matter what I do. I have tried all
          these combinations from the command line:
          >
          Add `import ClientCookie` to your setup.py (to make sure you actually
          *can* import it in your development environment).
          Also declare it as a required *package* (not module):
          >
          setup(windows=["C:\\exe\\pos_f inal2.py"],
                 ...
                 options={'py2ex e': {
                   'packages': ['ClientCookie',]
                   })
          >
          --
          Gabriel Genellina
          >
          Ok, thank you for your reply Gabriel. I did as you said, including
          adding 'import ClientCookie' to setup.py and that worked fine when
          running the script it found it. However, when actually running it
          through py2exe after adding the package as you have said, it still
          says 'No module named ClientCookie'
          >
          Any help would be greatly appreciated.
          >
          Vince
          Try asking at the py2exe mailing list as well. They can probably give
          you some pointers.

          Mike

          Comment

          Working...