Py2exe and Module Error...

V

vincehofmeister

Hey everyone:

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

http://wwwsearch.sourceforge.net/ClientCookie/

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_pound.py']);
setup(windows=[{"script" : "C:\\exe\\pos_final2.py"}],
options={"py2exe" : {"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_pound.py']);
setup(windows=[{"script" : "C:\\exe\\pos_final2.py"}],
options={"py2exe" : {"includes" : ["sip", "ClientCookie"]}})

^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.
 
G

Gabriel Genellina

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

http://wwwsearch.sourceforge.net/ClientCookie/

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_final2.py"],
...
options={'py2exe': {
'packages': ['ClientCookie',]
})
 
V

vincehofmeister

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_final2.py"],
...
options={'py2exe': {
'packages': ['ClientCookie',]
})

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
 
G

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.

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.
 
M

Mike Driscoll

En Wed, 22 Oct 2008 20:34:39 -0200, <[email protected]> escribió:
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_final2.py"],
       ...
       options={'py2exe': {
         'packages': ['ClientCookie',]
         })

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top