Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"introspection typelib not found" with python 3.7 on Windows 10 64 Bit #14

Closed
sattlma opened this issue Feb 4, 2019 · 4 comments
Closed

Comments

@sattlma
Copy link

sattlma commented Feb 4, 2019

Issue:

Hi folks,

I just can't get my little python program running on Windows 10 64 Bit.

import gi
from gi.repository import Gtk

gives

.....>python testi.py
Traceback (most recent call last):
  File "testi.py", line 2, in <module>
    from gi.repository import Gtk
  File "C:\Anaconda3\envs\python3.7\lib\site-packages\gi\importer.py", line 133, in load_module
    'introspection typelib not found' % namespace)
ImportError: cannot import name Gtk, introspection typelib not found

Setting GI_TYPELIB_PATH to C:\Anaconda3\envs\python3.7\Library\lib\girepository-1.0 where the .typelib files are doesn't change anything.

Do you have any idea?

Thanks!


Environment (conda list):
$ conda list
# packages in environment at C:\Anaconda3\envs\python3.7:
#
# Name                    Version                   Build  Channel
cairo                     1.16.0            hc1b38c8_1000    conda-forge
certifi                   2018.11.29            py37_1000    conda-forge
gettext                   0.19.8.1          hb01d8f6_1001    conda-forge
glib                      2.58.2            hc0c2ac7_1001    conda-forge
gobject-introspection     1.58.2          py37h1800f87_1000    conda-forge
icu                       58.2                     vc14_0    conda-forge
libffi                    3.2.1             h6538335_1005    conda-forge
libiconv                  1.15              hfa6e2cd_1004    conda-forge
libpng                    1.6.36            h7602738_1000    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6
m2w64-gcc-libs            5.3.0                         7
m2w64-gcc-libs-core       5.3.0                         7
m2w64-gmp                 6.1.0                         2
m2w64-libwinpthread-git   5.0.0.4634.697f757               2
msys2-conda-epoch         20160418                      1
pcre                      8.41              h6538335_1003    conda-forge
pip                       19.0.1                   py37_0    conda-forge
pixman                    0.34.0            hfa6e2cd_1003    conda-forge
pycairo                   1.17.1           py37h511c3a9_0
pygobject                 3.30.4          py37h5e4a255_1000    conda-forge
python                    3.7.1             hc182675_1000    conda-forge
setuptools                40.7.1                   py37_0    conda-forge
vc                        14                            0    conda-forge
vs2015_runtime            14.0.25420                    0    conda-forge
wheel                     0.32.3                   py37_0    conda-forge
wincertstore              0.2                   py37_1002    conda-forge
zlib                      1.2.11            h2fa13f4_1004    conda-forge

Details about conda and system ( conda info ):
$ conda info
     active environment : python3.7
    active env location : C:\Anaconda3\envs\python3.7
            shell level : 2
       user config file : C:\Users\user\.condarc
 populated config files : C:\Users\user\.condarc
          conda version : 4.5.11
    conda-build version : 1.19.0
         python version : 3.5.6.final.0
       base environment : C:\Anaconda3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/win-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/win-64
                          https://repo.anaconda.com/pkgs/pro/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Anaconda3\pkgs
                          C:\Users\user\AppData\Local\conda\conda\pkgs
       envs directories : C:\Anaconda3\envs
                          C:\Users\user\AppData\Local\conda\conda\envs
                          C:\Users\user\.conda\envs
               platform : win-64
             user-agent : conda/4.5.11 requests/2.19.1 CPython/3.5.6 Windows/10 Windows/10.0.16299
          administrator : False
             netrc file : None
           offline mode : False

@pkgw
Copy link
Contributor

pkgw commented Feb 4, 2019

Hi,

I believe the problem is that you're trying to import the Gtk library, which conda-forge doesn't provide. pygobject provides the general framework for access GObject-based libraries in Python, but the underlying library itself needs to be available. conda-forge provides Gtk2 on Linux and Mac, but we don't provide Gtk3 at all, and Gtk3 is the only version that supports gobject-introspection, if I recall correctly.

So, unfortunately I don't think we can do anything about this until we provide Gtk3 on Windows. That's definitely something in which there is interest, but Gtk3 takes a long time to compile and has a lot of dependencies, so it's a challenge.

As such, I'm going to close this bug, but feel free to comment or reopen if you believe there's something on the pygobject side that needs addressing.

@KarimaAL
Copy link

KarimaAL commented Sep 7, 2021

Is Gtk3 available now on windows?

@tschoonj
Copy link
Contributor

tschoonj commented Sep 7, 2021

Yes, it has been for a year or so. Also Gtk4 by the way.

@KarimaAL
Copy link

KarimaAL commented Sep 7, 2021

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants