Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Problem with py2exe conversion.

Reply
Thread Tools

Problem with py2exe conversion.

 
 
venutaurus539@gmail.com
Guest
Posts: n/a
 
      03-04-2009
Hello all,
I am facing an interesting problem with py2exe conversion.
I've a python script which uses the shutil libarary. When I convert
that python script into exe, it creates a dist folder and then in that
it places the exe. Along with the exe it also places a zip folder
containing pre compiled python scripts( library.zip).I have two
Win2003 machines.On one machine when I genreate the exe that zip file
also contains this shutil.pyc, but when I build the same python script
on the second machine, that shutli.pyc is missing in that zip file as
a result fo which I am unable to use that library on the second
machine. When I use it, it throws an error:

ImportError: No module named shutil

Can some one please suggest me a solution for this.

Thanks in advance,
Venu
 
Reply With Quote
 
 
 
 
Gabriel Genellina
Guest
Posts: n/a
 
      03-04-2009
En Wed, 04 Mar 2009 11:12:32 -0200, http://www.velocityreviews.com/forums/(E-Mail Removed)
<(E-Mail Removed)> escribió:

> Hello all,
> I am facing an interesting problem with py2exe conversion.
> I've a python script which uses the shutil libarary. When I convert
> that python script into exe, it creates a dist folder and then in that
> it places the exe. Along with the exe it also places a zip folder
> containing pre compiled python scripts( library.zip).I have two
> Win2003 machines.On one machine when I genreate the exe that zip file
> also contains this shutil.pyc, but when I build the same python script
> on the second machine, that shutli.pyc is missing in that zip file as
> a result fo which I am unable to use that library on the second
> machine. When I use it, it throws an error:
>
> ImportError: No module named shutil
>
> Can some one please suggest me a solution for this.


Are you sure it's the same script? The same setup.py? The same py2exe
version? Aren't you sharing the same directory for several projects?

--
Gabriel Genellina

 
Reply With Quote
 
 
 
 
venutaurus539@gmail.com
Guest
Posts: n/a
 
      03-04-2009
On Mar 4, 6:23*pm, "Gabriel Genellina" <(E-Mail Removed)> wrote:
> En Wed, 04 Mar 2009 11:12:32 -0200, (E-Mail Removed) *
> <(E-Mail Removed)> escribió:
>
> > Hello all,
> > * * * * * * I am facing an interesting problem with py2exe conversion.
> > I've a python script which uses the shutil libarary. When I convert
> > that python script into exe, it creates a dist folder and then in that
> > it places the exe. Along with the exe it also places a zip folder
> > containing pre compiled python scripts( library.zip).I have two
> > Win2003 machines.On one machine when I genreate the exe that zip file
> > also contains this shutil.pyc, but when I build the same python script
> > on the second machine, that shutli.pyc is missing in that zip file as
> > a result fo which I am unable to use that library on the second
> > machine. When I use it, it throws an error:

>
> > ImportError: No module named shutil

>
> > Can some one please suggest me a solution for this.

>
> Are you sure it's the same script? The same setup.py? The same py2exe *
> version? Aren't you sharing the same directory for several projects?
>
> --
> Gabriel Genellina


Thanks for the reply.. 1. It is the same script. Moreover even if the
scripts change, if my script uses that module, shouldn't it be there
in that zip. 2. I've used the same installer on the second machine
too. 3. No, am not sharing the directory.
Another observation I made is, if I copy the library.zip file
from the first machine to the second machine, these script runs
without any exception. But I can't every time copy the zip.

Thank you once again,
Venu Madhav.
 
Reply With Quote
 
Gabriel Genellina
Guest
Posts: n/a
 
      03-04-2009
En Wed, 04 Mar 2009 11:38:35 -0200, (E-Mail Removed)
<(E-Mail Removed)> escribió:
> On Mar 4, 6:23*pm, "Gabriel Genellina" <(E-Mail Removed)> wrote:
>> En Wed, 04 Mar 2009 11:12:32 -0200, (E-Mail Removed) *
>> <(E-Mail Removed)> escribió:
>>
>> > * * * * * * I am facing an interesting problem with py2exe conversion.
>> > I've a python script which uses the shutil libarary. When I convert
>> > that python script into exe, it creates a dist folder and then in that
>> > it places the exe. Along with the exe it also places a zip folder
>> > containing pre compiled python scripts( library.zip).I have two
>> > Win2003 machines.On one machine when I genreate the exe that zip file
>> > also contains this shutil.pyc, but when I build the same python script
>> > on the second machine, that shutli.pyc is missing in that zip file as
>> > a result fo which I am unable to use that library on the second
>> > machine. When I use it, it throws an error:

>>
>> > ImportError: No module named shutil

>>
>> > Can some one please suggest me a solution for this.

>>
>> Are you sure it's the same script? The same setup.py? The same py2exe *
>> version? Aren't you sharing the same directory for several projects?

>
> Thanks for the reply.. 1. It is the same script. Moreover even if the
> scripts change, if my script uses that module, shouldn't it be there
> in that zip. 2. I've used the same installer on the second machine
> too. 3. No, am not sharing the directory.


No idea then, apart from a bug in py2exe. I'd delete the dist and build
directories before regenerating the .exe, just to be sure.

--
Gabriel Genellina

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: [Py2exe-users] py2exe 0.6.9 released Chris Spencer Python 3 12-08-2008 05:17 PM
RE: [Py2exe-users] py2exe 0.6.9 released Mark Hammond Python 0 11-17-2008 05:27 AM
about py2exe, I installed it, but can't find py2exe.exe in my computer. python Python 3 05-22-2006 02:08 PM
[py2exe] py2exe and datetime -> No module named datetime F. GEIGER Python 0 08-16-2004 01:13 PM
problem w/ numarray & py2exe... RJS Python 0 07-01-2003 06:44 AM



Advertisments