Traceback (most recent call last):
File "StartECS.py", line 7, in <module> File "ECS.pyc", line 23, in <module> File "gtk \ __ init __. Pyc", line 40, in <module> File "gtk \ _gtk.pyc", line 12, in <module> File "gtk \ _gtk.pyc", line 10, in __load ImportError: DLL load failed: Can not find the specified program. In doing encountered this problem, try a lot of ways the Internet is still the same, I do not know there is no big God can help answer, thanks !!! Use version python2.7 -- View this message in context: http://python.6.x6.nabble.com/ImportError-DLL-load-failed-Can-not-find-the-specified-program-tp5188415.html Sent from the Gtk+ - Python mailing list archive at Nabble.com. _______________________________________________ pygtk mailing list [hidden email] http://mailman.daa.com.au/cgi-bin/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ |
Please check gtk installation. It could be bad installation or problem with specific DLL file.
I had in the past similar problem In order to solve problem 1-save data 2- desintall all gtk file 3- check directories are empty 4- install again |
Hi , thank you for your reply
I use python shell and type "from gtk import gdk", it's can work but use py2exe get the error. I desinstall pygtk-all-in-one-2.24.2.win32-py2.7 and check gtk runtime is the same error ![]() what should I do... pei |
Le 2016-05-19 15:29, yaphone a écrit :
> Hi , thank you for your reply > I use python shell and type "from gtk import gdk", it's can work > but use py2exe get the error. > > I desinstall pygtk-all-in-one-2.24.2.win32-py2.7 and check gtk runtime > is > the same error > <http://python.6.x6.nabble.com/file/n5191107/gtk.png> > > what should I do... Try adding the path to your GTK DLLs in your PATH -- Yann _______________________________________________ pygtk mailing list [hidden email] http://mailman.daa.com.au/cgi-bin/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ |
add the path : C:\Python27\Lib\site-packages\gtk-2.0\runtime\bin
also wrong, am I write..? pei |
hi when you desinstalled pygtk, did you check directorie pygtk was really empty?reboot PC and install again Window is so capricious.Version GtK 3.8.10 Version de Python 2.7.6 (default, Jun 22 2015, 17:58:13) 2016-05-19 16:31 GMT+02:00 yaphone [via Python] <[hidden email]>: add the path : C:\Python27\Lib\site-packages\gtk-2.0\runtime\bin -- francis Man Max
|
In reply to this post by yaphone
Hi pei,
On 19/05/16 23:29, yaphone wrote:
Hi , thank you for your reply I use python shell and type "from gtk import gdk", it's can work but use py2exe get the error. I desinstall pygtk-all-in-one-2.24.2.win32-py2.7 and check gtk runtime is the same error <http://python.6.x6.nabble.com/file/n5191107/gtk.png> what should I do... pei I dont get it, .. is the problem when you run from shell, or when you freeze the app (py2exe) and try an run? They are two different things, if freezing the app you need to work harder (setup.py) to include the gtk binaries into the app. I think most peoples answer's are trying to solve a python shell issue, not a py2exe issue, so you need to be very clear so people can give the correct answer. Steve _______________________________________________ pygtk mailing list [hidden email] http://mailman.daa.com.au/cgi-bin/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ |
This post was updated on .
Dear Steve,
thank for your suggestion, my problem is freeze the app (py2exe) and try an run but get error, I don't understand that it can run from shell but can't from py2exe it's my setyp.py: from distutils.core import setup import py2exe, sys, os setup( windows = [ { 'script': 'StartECS.py', 'icon_resources': [(1, "Network 1.ico")], } ], options = { 'py2exe': { 'bundle_files': 3 , 'packages': 'encodings', 'includes': 'cairo, pango, pangocairo, atk, gobject, gtk', } }, zipfile = None, data_files = [ ] ) pei |
Hi pei,
I cannot see anything on your link ( File not found ) ![]() It has been a very long time since I used pyGtk and python2.x, so I can only refer you to the following link from the py2exe web site. http://www.py2exe.org/index.cgi/Py2exeAndPyGTK When you freeze an app, .. it no longer uses the libraries installed on your PC, those libraries that the app uses need to be bundled with the app, py2exe will not automatically search out and install the gtk libraries into your app, they need specified in the setup.py.. that is why the resultant frozen app can then get installed on other peoples PC's, without needing them to install the 'extra' libraries. When you get ImportError on a frozen (py2exe) app it means the library cannot be found within the py2exe app, so you will need to learn to use setup.py to get the missing bits into frozen app. So I believe you need to stop looking at reinstalling your pygtk (as your app works from console right?) and start looking at what your setup.py might be missing. Cheers Steve On 22/05/16 18:31, yaphone wrote:
Dear Steve, thank for your suggestion, my problem is freeze the app (py2exe) and try an run but get error, I don't understand that it can run from shell but can't from py2exe it's my setyp.py <http://python.6.x6.nabble.com/file/n5191275/%E6%9C%AA%E5%91%BD%E5%90%8D.png> pei -- View this message in context: http://python.6.x6.nabble.com/ImportError-DLL-load-failed-Can-not-find-the-specified-program-tp5190965p5191275.html Sent from the Gtk+ - Python mailing list archive at Nabble.com. _______________________________________________ pygtk mailing list [hidden email] http://mailman.daa.com.au/cgi-bin/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ _______________________________________________ pygtk mailing list [hidden email] http://mailman.daa.com.au/cgi-bin/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ |
In reply to this post by yaphone
On May 22, 2016 10:31:20 AM GMT+02:00, yaphone <[hidden email]> wrote:
>Dear Steve, >thank for your suggestion, my problem is freeze the app (py2exe) and >try an >run but get error, >I don't understand that it can run from shell but can't from py2exe > >it's my setyp.py ><http://python.6.x6.nabble.com/file/n5191275/%E6%9C%AA%E5%91%BD%E5%90%8D.png> > > >pei > > > >-- >View this message in context: >http://python.6.x6.nabble.com/ImportError-DLL-load-failed-Can-not-find-the-specified-program-tp5190965p5191275.html >Sent from the Gtk+ - Python mailing list archive at Nabble.com. >_______________________________________________ >pygtk mailing list [hidden email] >http://mailman.daa.com.au/cgi-bin/mailman/listinfo/pygtk >Read the PyGTK FAQ: http://faq.pygtk.org/ Getting pygtk to work with py2exe is a pain. Try github.com/dieterv/pygtk2exe which takes care of the obscure details... Regards, Dietet _______________________________________________ pygtk mailing list [hidden email] http://mailman.daa.com.au/cgi-bin/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ |
Free forum by Nabble | Edit this page |