Coherence + py2exe issue

10 messages Options
Embed this post
Permalink
Alexander Bondarenko

Coherence + py2exe issue

Reply Threaded More More options
Print post
Permalink
I haven’t found any information about coherence and py2exe. So I've tried to compile coherence to exe file. I've compiled scripts\coherence. As a result I've got coherence.exe and some libraries. Then I've tried to run an executable file on the clean machine, i.e. without Python, and I've got the following error:

C:\temp\Coherence>coherence.exe
Traceback (most recent call last):
  File "coherence", line 4, in <module>
  File "pkg_resources.pyc", line 2562, in <module>
  File "pkg_resources.pyc", line 626, in require
  File "pkg_resources.pyc", line 524, in resolve
pkg_resources.DistributionNotFound: coherence==0.6.2

Coherence has been installed with the help of easy_install. Maybe this is the reason for such errors.
I know I missed something but what is this? I’d really appreciate if somebody can help me finding the right direction.

Thanks,
Alexander Bondarenko
Benjamin Kampmann

Re: Coherence + py2exe issue

Reply Threaded More More options
Print post
Permalink
Hi Alexander.

I assume you read about The Inspector installer already. I ran into
several issues with py2exe. After some research I found out their
egg-support is very poor (aka not existent), so I replaced it with
another building tool, that worked much better for me: bfreeze . I was
able to install it with easy_install and it worked quiet well.

I just checked in the necessary files and a short readme on how to do
the installer for the inspector. that should help you as well with
your coherence binary. BTW. one plan is to have a seperate coherence
installer soon.

It is located in win32 in the upnp-inspector:
http://coherence.beebits.net/browser/trunk/UPnP-Inspector/win32

I hope that can help you building your binary. If you need more help,
let me known. Also keep us up to date on your progress.

Greetz, ben


2009/5/18 Alexander Bondarenko <[hidden email]>:

>
> I haven’t found any information about coherence and py2exe. So I've tried to
> compile coherence to exe file. I've compiled scripts\coherence. As a result
> I've got coherence.exe and some libraries. Then I've tried to run an
> executable file on the clean machine, i.e. without Python, and I've got the
> following error:
>
> C:\temp\Coherence>coherence.exe
> Traceback (most recent call last):
>  File "coherence", line 4, in <module>
>  File "pkg_resources.pyc", line 2562, in <module>
>  File "pkg_resources.pyc", line 626, in require
>  File "pkg_resources.pyc", line 524, in resolve
> pkg_resources.DistributionNotFound: coherence==0.6.2
>
> Coherence has been installed with the help of easy_install. Maybe this is
> the reason for such errors.
> I know I missed something but what is this? I’d really appreciate if
> somebody can help me finding the right direction.
>
> Thanks,
> Alexander Bondarenko
> --
> View this message in context: http://n2.nabble.com/Coherence-%2B-py2exe-issue-tp2933473p2933473.html
> Sent from the coherence-dev mailing list archive at Nabble.com.
>
> _______________________________________________
> coherence-dev mailing list
> [hidden email]
> http://lists.beebits.net/cgi-bin/mailman/listinfo/coherence-dev
>
_______________________________________________
coherence-dev mailing list
[hidden email]
http://lists.beebits.net/cgi-bin/mailman/listinfo/coherence-dev
Alexander Bondarenko

Re: Coherence + py2exe issue

Reply Threaded More More options
Print post
Permalink
Hi Benjamin,

Benjamin Kampmann wrote:
It is located in win32 in the upnp-inspector:
http://coherence.beebits.net/browser/trunk/UPnP-Inspector/win32

I hope that can help you building your binary. If you need more help,
let me known. Also keep us up to date on your progress.
Thank you very much for your help. The information that you’ve provided was very helpful. Following the instructions from inspector_build.txt, I’ve gone through each step of to-do. As I know there are possible issues with installing of GTK+ for Windows and pygtk. So I made a simple test after installing them (as described on pygtk-site). The test script works as supposed.
So the final step … launch upnp-inspector.exe … and nothing happened. No windows, no messages on the screen and in the events log. Just upnp-inspector.exe appears as a process and in 1-2 sec it is gone.
Have I done something wrong?

P.S. UpnP-Inspector which I installed with the help of easy_install works well.

Thanks,
Alexander Bondarenko
Alexander Bondarenko

Re: Coherence + py2exe issue

Reply Threaded More More options
Print post
Permalink
Alexander Bondarenko wrote:
As I know there are possible issues with installing of GTK+ for Windows and pygtk. So I made a simple test after installing them (as described on pygtk-site). The test script works as supposed.
I'm saying about this test code:

  import gtk

  window = gtk.Window()
  window.set_title("PyGTK Test Window")
  window.connect("destroy", gtk.main_quit)
  window.show_all()

  gtk.main()
Benjamin Kampmann

Re: Coherence + py2exe issue

Reply Threaded More More options
Print post
Permalink
Hi Alexander,

I am glad that my information helped you and I will try to help you
even more. I can recall having the same issue when bbfreeze did not
build correctly, but I can't remember the reason why. So I do some
remote debugging by asking you this:
 1. did you install all the dependencies for coherence? (like twisted
and stuff) and how did you install them?
 2. windows xp or vista? 64-bit?
 3. did you install ALL the py-gtk-bindings? Meaning pycairo, pygtk
AND pygobject? And did you take care to always use the python2.5
version?
4. did you install pywin32 as well? That is needed to find the right libs.
5. is it a fresh installation of windows or did you change anything?
6. last but not least: what version of python are you trying?

You could also help me a lot, if you would provide me a "dir"-output
of the content bbfreeze has put into your "\build" directory.

A very good way to debug the binary is also by starting the included
"py" exe. It is the bundled python only knowing about the local libs
and eggs. You could try to run upnp-inspector.py with that interpreter
and you can see traceback that makes it crash:

  py.exe ..\upnp-inspector.py

Sadly the upnp-inspector.exe is currently not showing any tracebacks
if something goes wrong :( .

Hope taht was helpfull,
Ben

2009/5/19 Alexander Bondarenko <[hidden email]>:

>
>
> Alexander Bondarenko wrote:
>>
>> As I know there are possible issues with installing of GTK+ for Windows
>> and pygtk. So I made a simple test after installing them (as described on
>> pygtk-site). The test script works as supposed.
>>
>
> I'm saying about this test code:
>
>  import gtk
>
>  window = gtk.Window()
>  window.set_title("PyGTK Test Window")
>  window.connect("destroy", gtk.main_quit)
>  window.show_all()
>
>  gtk.main()
> --
> View this message in context: http://n2.nabble.com/Coherence-%2B-py2exe-issue-tp2933473p2940567.html
> Sent from the coherence-dev mailing list archive at Nabble.com.
>
> _______________________________________________
> coherence-dev mailing list
> [hidden email]
> http://lists.beebits.net/cgi-bin/mailman/listinfo/coherence-dev
>
_______________________________________________
coherence-dev mailing list
[hidden email]
http://lists.beebits.net/cgi-bin/mailman/listinfo/coherence-dev
Alexander Bondarenko

Re: Coherence + py2exe issue

Reply Threaded More More options
Print post
Permalink
Benjamin,

Benjamin Kampmann wrote:
 1. did you install all the dependencies for coherence? (like twisted
and stuff) and how did you install them?
Yes, I've installed the dependencies for coherence, i.e. twisted from windows installer and netifaces with the help of easy_install (I know the last one is optional). Coherence doesn't require more dependencies, am I right?

Benjamin Kampmann wrote:
 2. windows xp or vista? 64-bit?
Windows XP Professional 32-bit with SP3

Benjamin Kampmann wrote:
 3. did you install ALL the py-gtk-bindings? Meaning pycairo, pygtk
AND pygobject? And did you take care to always use the python2.5
version?
Yes, all this stuff has been installed. For install I've used packages for win/python2.5

Benjamin Kampmann wrote:
4. did you install pywin32 as well? That is needed to find the right libs.
pywin32 has been installed with help of easy_install

Benjamin Kampmann wrote:
5. is it a fresh installation of windows or did you change anything?
No, unfortunately my windows installation is rather old.

Benjamin Kampmann wrote:
6. last but not least: what version of python are you trying?
The last working version for coherence. It is 2.5.4.

Benjamin Kampmann wrote:
You could also help me a lot, if you would provide me a "dir"-output
of the content bbfreeze has put into your "\build" directory.
list.txt

I've attached the file with listing of "\build" directory.

Thanks a lot,
Alexander
Benjamin Kampmann

Re: Coherence + py2exe issue

Reply Threaded More More options
Print post
Permalink
2009/5/19 Alexander Bondarenko <[hidden email]>:
>
[....]
that sounded all about alright. skipped it.

>
> Benjamin Kampmann wrote:
>>
>> You could also help me a lot, if you would provide me a "dir"-output
>> of the content bbfreeze has put into your "\build" directory.
>>
> http://n2.nabble.com/file/n2941440/list.txt list.txt
Alright, now THAT is intresting. I have some minor differences here
with my version:
 1. I have an upnp-inspector egg in the directory
 2. I have an setuptools egg in the directory
 3. my library.zip is slightly smaller

For these things I wonder how you installed them, because it picks
eggs if it can find any. So take a look if upnp-inspector and
setuptools are IN your library.zip. If they are that should not cause
any trouble, even though I didn't try with setuptools inside the
library file yet.

Anyways, there are is one file you don't seem to have and that makes
me wonder: I also have a file called "POWRPROF.dll" . Not sure if that
is the actual problem but might be worth looking into it.

Beside that I can't see any reason why it shouldn't work, so let's
continue debugging. Please run the following code from the commandline
(from the parent dir of "build"):

  build\py upnp-inspector.py

And pastebin the output. It probably gives you a traceback that can
help a lot. If you need any help with that, sent it as well.

Greetz from germany and time to go home
ben
_______________________________________________
coherence-dev mailing list
[hidden email]
http://lists.beebits.net/cgi-bin/mailman/listinfo/coherence-dev
Alexander Bondarenko

Re: Coherence + py2exe issue

Reply Threaded More More options
Print post
Permalink
In reply to this post by Alexander Bondarenko
After I've wrote the last post I've tried to run upnp-inspector.exe on the virtual machine with clean WinXP (without python, GTK+ and all others stuff) and got the following message - something like "libglib-2.0.0.dll don't find. reinstall the application"

Regards,
Alexander Bondarenko
Alexander Bondarenko

Re: Coherence + py2exe issue

Reply Threaded More More options
Print post
Permalink
In reply to this post by Benjamin Kampmann
Benjamin,

Benjamin Kampmann wrote:
Beside that I can't see any reason why it shouldn't work, so let's
continue debugging. Please run the following code from the commandline
(from the parent dir of "build"):

  build\py upnp-inspector.py

And pastebin the output. It probably gives you a traceback that can
help a lot. If you need any help with that, sent it as well.
IT'S WORKING now on my WinXP SP3. Really don't know what it was previously.
But still don't work on fresh WinXP.

Regards,
Alexander Bondarenko
Benjamin Kampmann

Re: Coherence + py2exe issue

Reply Threaded More More options
Print post
Permalink
2009/5/19 Alexander Bondarenko <[hidden email]>:

>
> Benjamin,
>
>
> Benjamin Kampmann wrote:
>>
>> Beside that I can't see any reason why it shouldn't work, so let's
>> continue debugging. Please run the following code from the commandline
>> (from the parent dir of "build"):
>>
>>   build\py upnp-inspector.py
>>
>> And pastebin the output. It probably gives you a traceback that can
>> help a lot. If you need any help with that, sent it as well.
>>
>
> IT'S WORKING now on my WinXP SP3. Really don't know what it was previously.
> But still don't work on fresh WinXP.

You mean it is not working on a fresh system if you only copy the
binary and the build directory? No, that doesn't work. It still misses
the gtk2+-runtime. That is why we have an installer bundled. It
includes the runtime and installs it as well if necessary.


GTK2.0+-Runtime AND build-directory-content is bare minimum to run the
inspector on windows.

Greetzi,
ben


btw. the new installer for 0.2.2 including coherence 0.6.4 is out as well :)
_______________________________________________
coherence-dev mailing list
[hidden email]
http://lists.beebits.net/cgi-bin/mailman/listinfo/coherence-dev