By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,743 Members | 1,072 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,743 IT Pros & Developers. It's quick & easy.

Py2exe and Module Error...

P: n/a
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.


Oct 22 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
En Wed, 22 Oct 2008 20:34:39 -0200, <vi*************@gmail.comescribió:
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',]
})

--
Gabriel Genellina

Oct 23 '08 #2

P: n/a
On Oct 22, 8:33 pm, "Gabriel Genellina" <gagsl-...@yahoo.com.ar>
wrote:
En Wed, 22 Oct 2008 20:34:39 -0200, <vincehofmeis...@gmail.comescribió:
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',]
})

--
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
Oct 23 '08 #3

P: n/a
En Thu, 23 Oct 2008 20:02:41 -0200, <vi*************@gmail.comescribió:
On Oct 22, 8:33 pm, "Gabriel Genellina" <gagsl-...@yahoo.com.ar>
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:
>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:
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

Oct 24 '08 #4

P: n/a
On Oct 23, 5:02*pm, vincehofmeis...@gmail.com wrote:
On Oct 22, 8:33 pm, "Gabriel Genellina" <gagsl-...@yahoo.com.ar>
wrote:
En Wed, 22 Oct 2008 20:34:39 -0200, <vincehofmeis...@gmail.comescribió:
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',]
* * * * *})
--
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
Oct 24 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.