472,958 Members | 2,276 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

Py2exe and Module Error...

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
4 5737
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Giles Brown | last post by:
I'm feeling quite dumb this morning. I'm trying to build a COM server DLL using py2exe and it ain't working. Here's what ain't working... setup_dll.py based on py2exe sample: """from...
2
by: x-herbert | last post by:
Hi, I have a small test to "compile" al litle script as a WMI-Tester. The script include a wmi-wrapper and "insert" the Win32-modeles. here the code: my "WMI-Tester.py" ----- import wmi
1
by: Marc | last post by:
Hello, I've fiddled with this for quite a while and thought I had the problem solved. I had a version that would successfully compile and run. But then I had to change the code to use a...
5
by: Rene Olsthoorn | last post by:
Dear readers, py2exe has a problem including libxml2. Not at building time, but at runtime. The libxml2.dll cannot be loaded... Is there anyone that NOT has the problem? (and can you drop me...
10
by: Justin Straube | last post by:
Hello, Im trying to compile a script with py2exe. The pickle module is causing the program to give an error. Traceback (most recent call last): File "SETIstat.pyw", line 330, in ? File...
0
by: jantod | last post by:
I am trying to package my application with py2exe. Unfortunately it uses both scipy/numpy and numarray so I'm having to jump through a lot of hoops to get it going. I'm getting problems packaging...
0
by: Karlo Lozovina | last post by:
I've just upgraded to Python 2.5, SQLAlchemy 0.3.3, and py2exe 0.6.5 (the py2.5 version, yes). Simple: --- import sqlalchemy print 'Test' ---
3
by: Kevin | last post by:
Hi everyone, I'm running Python 2.5.1 on an XP-Pro platform, with all the updates (SP2, etc) installed. I have a program (send_file.py) that sends a file to a service provider, using an ftp...
1
by: Jimmy Retzlaff | last post by:
py2exe 0.6.8 released ===================== py2exe is a Python distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.