Unable to import gtk on Windows Vista

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to import gtk on Windows Vista

David Lynch-4
      Because I wanted the Geography view, and Python 2.6 was advised as
necessary, I have tried and failed to install gramps on Python 2.6.
I am on Vista SP2, and have installed and run Gramps on Python 2.5.

I have read and followed the advice at
http://gramps-project.org/wiki/index.php?title=Windows_installer
and that from Steven George below.

Always, the response to "import gtk" is
 >>>>>>>>
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "C:\Python26\lib\site-packages\gtk-2.0\gtk\__init__.py", line
40, in <mod
ule>
     from gtk import _gtk
ImportError: DLL load failed: The specified procedure could not be found.
 >>>>>>>>>
In order to isolate the problem, I have tried the following paths and
tried "import gtk" from the python command line:

C:\Windows\system32;C:\Windows;C:\Program Files\GTK\bin
C:\Windows\system32;C:\Windows;C:\GTK\bin
C:\Windows\system32;C:\Windows;C:\Program Files\GTK2-Runtime\bin
C:\Windows\system32;C:\Windows;C:\Program Files\GTK2-Runtime\bin;C:\GTK\bin
C:\Windows\system32;C:\Windows;C:\GTK\bin;C:\Program Files\GTK2-Runtime\bin
C:\Windows\system32;C:\Windows;C:\Program
Files\GTK2-Runtime\bin;C:\Program Files\GTK\bin
C:\Windows\system32;C:\Windows;C:\Program Files\GTK\bin;C:\Program
Files\GTK2-Runtime\bin

All fail in the same way.

Can anyone help please?

David Lynch

 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Can you clarify, have you have Gramps working on the computer before?
The screen you are talking about is an informational screen, you can
install anyway, but if gtk&  pyGTK are not installed properly don't
expect GRAMPS to run.

It is important that gtk runtime is on the system path, else python wont
be able to find it.

If you start a windows command prompt. you can test it for yourself.


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\user>python
Python 2.6.3 (r263rc1:75186, Oct  2 2009, 20:40:30) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
  >>>  import gtk
  >>>  import pygtk
  >>>

If no import errors, then all is OK.

If python is not on the path you will need to put full path in to start
the python interpretor

C:\Documents and Settings\user>c:\Python26\python.exe
Python 2.6.3 (r263rc1:75186, Oct  2 2009, 20:40:30) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
  >>>  import gtk
  >>>  import pygtk
  >>>

Or do you get a traceback similar to this

Traceback (most recent call last):
    File "<stdin>", line 1, in<module>
    File "c:\Python26\lib\site-packages\gtk-2.0\gtk\__init__.py", line 40,
in<module>
      from gtk import _gtk
ImportError: DLL load failed: The specified procedure could not be found.


1) I had an import error on a XP 32bit machine. I solved it by
installing Microsoft Visual C++ redist for 2008 SP1
http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en  <http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en>


2) On a windows 2000 machine I had a similar error when the GTK runtime
bin path was not in the environments path.

      Maybe you should check your GTK runtime is in the path.

Each time you perform one of these actions you may need to close down the command prompt and create a new one, esp. adding the path to environment will need a new command prompt to see the new path.

Until you get 'import gtk' working from the python interpreter, you cannot expect Gramps to use the gtk libraries.

Steve
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>





------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Gramps-windows mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-windows
Reply | Threaded
Open this post in threaded view
|

Re: Unable to import gtk on Windows Vista

Peter Landgren
Hi,

Check if you have intl.dll and iconv.dll in the "C:\windows\system" directory.
If so, rename them temporary to intl.dllx and iconv.dllx.
Maybe check also for zlib1.dll.

/Peter


>       Because I wanted the Geography view, and Python 2.6 was advised as
> necessary, I have tried and failed to install gramps on Python 2.6.
> I am on Vista SP2, and have installed and run Gramps on Python 2.5.
>
> I have read and followed the advice at
> http://gramps-project.org/wiki/index.php?title=Windows_installer
> and that from Steven George below.
>
> Always, the response to "import gtk" is
>
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
>    File "C:\Python26\lib\site-packages\gtk-2.0\gtk\__init__.py", line
> 40, in <mod
> ule>
>      from gtk import _gtk
> ImportError: DLL load failed: The specified procedure could not be found.
>
> In order to isolate the problem, I have tried the following paths and
> tried "import gtk" from the python command line:
>
> C:\Windows\system32;C:\Windows;C:\Program Files\GTK\bin
> C:\Windows\system32;C:\Windows;C:\GTK\bin
> C:\Windows\system32;C:\Windows;C:\Program Files\GTK2-Runtime\bin
> C:\Windows\system32;C:\Windows;C:\Program Files\GTK2-Runtime\bin;C:\GTK\bin
> C:\Windows\system32;C:\Windows;C:\GTK\bin;C:\Program Files\GTK2-Runtime\bin
> C:\Windows\system32;C:\Windows;C:\Program
> Files\GTK2-Runtime\bin;C:\Program Files\GTK\bin
> C:\Windows\system32;C:\Windows;C:\Program Files\GTK\bin;C:\Program
> Files\GTK2-Runtime\bin
>
> All fail in the same way.
>
> Can anyone help please?
>
> David Lynch
>
>
>
> Can you clarify, have you have Gramps working on the computer before?
> The screen you are talking about is an informational screen, you can
> install anyway, but if gtk&  pyGTK are not installed properly don't
> expect GRAMPS to run.
>
> It is important that gtk runtime is on the system path, else python wont
> be able to find it.
>
> If you start a windows command prompt. you can test it for yourself.
>
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\Documents and Settings\user>python
> Python 2.6.3 (r263rc1:75186, Oct  2 2009, 20:40:30) [MSC v.1500 32 bit
> (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>
>   >>>  import gtk
>   >>>  import pygtk
>
> If no import errors, then all is OK.
>
> If python is not on the path you will need to put full path in to start
> the python interpretor
>
> C:\Documents and Settings\user>c:\Python26\python.exe
> Python 2.6.3 (r263rc1:75186, Oct  2 2009, 20:40:30) [MSC v.1500 32 bit
> (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>
>   >>>  import gtk
>   >>>  import pygtk
>
> Or do you get a traceback similar to this
>
> Traceback (most recent call last):
>     File "<stdin>", line 1, in<module>
>     File "c:\Python26\lib\site-packages\gtk-2.0\gtk\__init__.py", line 40,
> in<module>
>       from gtk import _gtk
> ImportError: DLL load failed: The specified procedure could not be found.
>
>
> 1) I had an import error on a XP 32bit machine. I solved it by
> installing Microsoft Visual C++ redist for 2008 SP1
> http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7
> -A40D-3802B2AF5FC2&displaylang=en
> <http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4A
> B7-A40D-3802B2AF5FC2&displaylang=en>
>
>
> 2) On a windows 2000 machine I had a similar error when the GTK runtime
> bin path was not in the environments path.
>
>       Maybe you should check your GTK runtime is in the path.
>
> Each time you perform one of these actions you may need to close down the
> command prompt and create a new one, esp. adding the path to environment
> will need a new command prompt to see the new path.
>
> Until you get 'import gtk' working from the python interpreter, you cannot
> expect Gramps to use the gtk libraries.
>
> Steve
>
>
>
>
>
>
> ---------------------------------------------------------------------------
> --- Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Gramps-windows mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-windows

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Gramps-windows mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-windows
Reply | Threaded
Open this post in threaded view
|

Re: Unable to import gtk on Windows Vista

David Lynch-4
  On 26/11/2010 12:19, Peter Landgren wrote:
Peter,

     Thanks for the suggestion.

     I renamed intl.dll, inconv.dll and zlib1.dll, which were in
windows\system32, not windows\system, as you suggested, but I got the
same error.

     I also tried removing the \windows directories from the path, again
without success.

David Lynch

> Hi,
>
> Check if you have intl.dll and iconv.dll in the "C:\windows\system" directory.
> If so, rename them temporary to intl.dllx and iconv.dllx.
> Maybe check also for zlib1.dll.
>
> /Peter
>
>
>>        Because I wanted the Geography view, and Python 2.6 was advised as
>> necessary, I have tried and failed to install gramps on Python 2.6.
>> I am on Vista SP2, and have installed and run Gramps on Python 2.5.
>>
>> I have read and followed the advice at
>> http://gramps-project.org/wiki/index.php?title=Windows_installer
>> and that from Steven George below.
>>
>> Always, the response to "import gtk" is
>>
>> Traceback (most recent call last):
>>     File "<stdin>", line 1, in<module>
>>     File "C:\Python26\lib\site-packages\gtk-2.0\gtk\__init__.py", line
>> 40, in<mod
>> ule>
>>       from gtk import _gtk
>> ImportError: DLL load failed: The specified procedure could not be found.
>>
>> In order to isolate the problem, I have tried the following paths and
>> tried "import gtk" from the python command line:
>>
>> C:\Windows\system32;C:\Windows;C:\Program Files\GTK\bin
>> C:\Windows\system32;C:\Windows;C:\GTK\bin
>> C:\Windows\system32;C:\Windows;C:\Program Files\GTK2-Runtime\bin
>> C:\Windows\system32;C:\Windows;C:\Program Files\GTK2-Runtime\bin;C:\GTK\bin
>> C:\Windows\system32;C:\Windows;C:\GTK\bin;C:\Program Files\GTK2-Runtime\bin
>> C:\Windows\system32;C:\Windows;C:\Program
>> Files\GTK2-Runtime\bin;C:\Program Files\GTK\bin
>> C:\Windows\system32;C:\Windows;C:\Program Files\GTK\bin;C:\Program
>> Files\GTK2-Runtime\bin
>>
>> All fail in the same way.
>>
>> Can anyone help please?
>>
>> David Lynch



------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Gramps-windows mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-windows
Reply | Threaded
Open this post in threaded view
|

Re: Unable to import gtk on Windows Vista

Stephen George
Hi David,

As a result of your post I am starting to set up a new page on the Wiki
dealing specifically with this error.

The page needs more work, however I now need to go out for rest of day
so wont get any more done today.
http://www.gramps-project.org/wiki/index.php?title=ImportError:_DLL_load_failed

I dont know if you looked at recent posts on Gramps-Windows forum, but I
recently went through this with Peter.

Attached you will find the script I mention on the Wiki Page (haven't
worked out how to attach it to the page yet)

This is the text I told Peter the other day

 > Try the attached script, it can help identify some of these issues.
 >
 > However to get the most out of the script you also need to download
and install win32api (a small python module handles win32 specifics)
 > http://python.net/crew/mhammond/win32/
 > to handle short DOS paths if used.
 >
 > Also possibly more importantly (for your problem) download
dependancywalker and unzip into same folder script resides in.
 > http://www.dependencywalker.com/
 > Excellent for finding missing DLL's
 >
 > Run the attached script and check (or post online) the output of the
script.
 >
 > Note; The DependencyWalker section may post a number of issues, that
can safely be ignored.

Are you familiar with running scripts from the command line?, hope so.

This might give you something to try until I have had time to complete
the Wiki Page.

Steve


On 27/11/2010 2:40 AM, David Lynch wrote:

>    On 26/11/2010 12:19, Peter Landgren wrote:
> Peter,
>
>       Thanks for the suggestion.
>
>       I renamed intl.dll, inconv.dll and zlib1.dll, which were in
> windows\system32, not windows\system, as you suggested, but I got the
> same error.
>
>       I also tried removing the \windows directories from the path, again
> without success.
>
> David Lynch
>
>> Hi,
>>
>> Check if you have intl.dll and iconv.dll in the "C:\windows\system" directory.
>> If so, rename them temporary to intl.dllx and iconv.dllx.
>> Maybe check also for zlib1.dll.
>>
>> /Peter
>>
>>
>>>         Because I wanted the Geography view, and Python 2.6 was advised as
>>> necessary, I have tried and failed to install gramps on Python 2.6.
>>> I am on Vista SP2, and have installed and run Gramps on Python 2.5.
>>>
>>> I have read and followed the advice at
>>> http://gramps-project.org/wiki/index.php?title=Windows_installer
>>> and that from Steven George below.
>>>
>>> Always, the response to "import gtk" is
>>>
>>> Traceback (most recent call last):
>>>      File "<stdin>", line 1, in<module>
>>>      File "C:\Python26\lib\site-packages\gtk-2.0\gtk\__init__.py", line
>>> 40, in<mod
>>> ule>
>>>        from gtk import _gtk
>>> ImportError: DLL load failed: The specified procedure could not be found.
>>>
>>> In order to isolate the problem, I have tried the following paths and
>>> tried "import gtk" from the python command line:
>>>
>>> C:\Windows\system32;C:\Windows;C:\Program Files\GTK\bin
>>> C:\Windows\system32;C:\Windows;C:\GTK\bin
>>> C:\Windows\system32;C:\Windows;C:\Program Files\GTK2-Runtime\bin
>>> C:\Windows\system32;C:\Windows;C:\Program Files\GTK2-Runtime\bin;C:\GTK\bin
>>> C:\Windows\system32;C:\Windows;C:\GTK\bin;C:\Program Files\GTK2-Runtime\bin
>>> C:\Windows\system32;C:\Windows;C:\Program
>>> Files\GTK2-Runtime\bin;C:\Program Files\GTK\bin
>>> C:\Windows\system32;C:\Windows;C:\Program Files\GTK\bin;C:\Program
>>> Files\GTK2-Runtime\bin
>>>
>>> All fail in the same way.
>>>
>>> Can anyone help please?
>>>
>>> David Lynch
>
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App&  Earn a Chance To Win $500!
> Tap into the largest installed PC base&  get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Gramps-windows mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-windows
>

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Gramps-windows mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-windows

check_gtk_install.py (12K) Download Attachment