question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Converting pygobject to a wheel

See original GitHub issue

I had some difficulty converting pygobject into a wheel. Perhaps I missed a step or there is a command I needed to use of which I did not. I did try several things like, --fatten, etc.

My goal was to get pygobject into a python 3.7 install as it is difficult to build, and when googling I found out that it was on aconda cloud.

I used a fresh miniconda install with just conda install -c conda-forge pygobject conda-press and whatever else miniconda installs itself when running that command.

I first tried the --subdir win-64 pygobject=3.30.5=py37h5e4a255_0 to do it in batch, but the tree had too many conflicts.

Package cairo conflicts for:
gobject-introspection=1 -> cairo[version='>=1.16.0,<1.17.0a0']
pycairo -> cairo[version='1.14.*|>=1.14.10,<1.15.0a0|>=1.14.10,<2.0a0|>=1.14.12,<1.15.0a0|>=1.14.12,<2.0a0|>=1.16.0,<1.17.0a0']
Package vc conflicts for:
libffi[version='>=3.2.1,<3.3.0a0'] -> vc[version='14.*|9.*']
and so forth

So then I proceeded to do it by the individual packages, the tar.bzs. I would conda press a tar.bz starting wtih pygobject in my aconda prompt, then pip install in a normal command prompt, looking for dependencies. If it did not have a tar.bz like the vs2015-runtimes package, I would use a --subdir win-64 command to make the wheel.

I ended up with

cairo-1.16.0-1002_h60892f0-py2.py3-none-win_amd64.whl
gettext-0.19.8.1-1002_hb01d8f6-py2.py3-none-win_amd64.whl
glib-2.58.3-1002_hc0c2ac7-py2.py3-none-win_amd64.whl
gobject_introspection-1.58.2-1002_py37h1800f87-cp37-cp37m-win_amd64.whl
icu-64.2-1_he025d50-py2.py3-none-win_amd64.whl
libffi-3.2.1-1006_h6538335-py2.py3-none-win_amd64.whl
libiconv-1.15-7_h1df5818-py2.py3-none-win_amd64.whl
libpng-1.6.37-0_h7602738-py2.py3-none-win_amd64.whl
m2w64_gcc_libgfortran-5.3.0-6_6-py2.py3-none-win_amd64.whl
m2w64_gcc_libs-5.3.0-7_7-py2.py3-none-win_amd64.whl
m2w64_gcc_libs_core-5.3.0-7_7-py2.py3-none-win_amd64.whl
m2w64_gmp-6.1.0-2_2-py2.py3-none-win_amd64.whl
m2w64_libwinpthread_git-5.0.0.4634.697f757-2_2-py2.py3-none-win_amd64.whl
msys2_conda_epoch-20160418-1_1-py2.py3-none-win_amd64.whl
pcre-8.41-1003_h6538335-py2.py3-none-win_amd64.whl
pixman-0.38.0-1003_hfa6e2cd-py2.py3-none-win_amd64.whl
pygobject-3.30.5-0_py37h5e4a255-cp37-cp37m-win_amd64.whl
vc-14.1-3_h21ff451-py2.py3-none-win_amd64.whl
vs2015_runtime-14.15.26706-4_h3a45250-py2.py3-none-win_amd64.whl
zlib-1.2.11-3_h62dcd97-py2.py3-none-win_amd64.whl

Pip did not have any errors except for gobject_introspection and pygobjects itself as follows:

C:\Miniconda3\wheels>python -m pip install gobject_introspection-1.58.2-1002_py37h1800f87-cp37-cp37m-win_amd64.whl
Processing c:\miniconda3\wheels\gobject_introspection-1.58.2-1002_py37h1800f87-cp37-cp37m-win_amd64.whl
Requirement already satisfied: vc<15.0a0,>=14 in c:\python3\lib\site-packages (from gobject-introspection==1.58.2) (14.1)
Requirement already satisfied: libffi<3.3.0a0,>=3.2.1 in c:\python3\lib\site-packages (from gobject-introspection==1.58.2) (3.2.1)
Requirement already satisfied: cairo<1.17.0a0,>=1.16.0 in c:\python3\lib\site-packages (from gobject-introspection==1.58.2) (1.16.0)
Requirement already satisfied: glib<3.0a0,>=2.58.3 in c:\python3\lib\site-packages (from gobject-introspection==1.58.2) (2.58.3)
Collecting python<3.8.0a0,>=3.7 (from gobject-introspection==1.58.2)
  ERROR: Could not find a version that satisfies the requirement python<3.8.0a0,>=3.7 (from gobject-introspection==1.58.2) (from versions: none)
ERROR: No matching distribution found for python<3.8.0a0,>=3.7 (from gobject-introspection==1.58.2)
C:\Miniconda3\wheels>python -m pip install pygobject-3.30.5-0_py37h5e4a255-cp37-cp37m-win_amd64.whl
Processing c:\miniconda3\wheels\pygobject-3.30.5-0_py37h5e4a255-cp37-cp37m-win_amd64.whl
Requirement already satisfied: libiconv in c:\python3\lib\site-packages (from pygobject==3.30.5) (1.15)
Requirement already satisfied: libffi<3.3.0a0,>=3.2.1 in c:\python3\lib\site-packages (from pygobject==3.30.5) (3.2.1)
Requirement already satisfied: gobject_introspection==1.* in c:\python3\lib\site-packages (from pygobject==3.30.5) (1.58.2)
Collecting pycairo (from pygobject==3.30.5)
  Using cached https://files.pythonhosted.org/packages/48/20/5e83af98eb897935bf7dc39455e892ba866feebb9b7c3b392982866f9958/pycairo-1.18.1.tar.gz
Requirement already satisfied: glib<3.0a0,>=2.58.3 in c:\python3\lib\site-packages (from pygobject==3.30.5) (2.58.3)
Requirement already satisfied: vc<15.0a0,>=14 in c:\python3\lib\site-packages (from pygobject==3.30.5) (14.1)
Collecting python<3.8.0a0,>=3.7 (from pygobject==3.30.5)
  ERROR: Could not find a version that satisfies the requirement python<3.8.0a0,>=3.7 (from pygobject==3.30.5) (from versions: none)
ERROR: No matching distribution found for python<3.8.0a0,>=3.7 (from pygobject==3.30.5)

Just in case, I tried making the wheels with --skip-python and it did not help. I finally out of last resort, believing that all the previous dependencies were actually met and that the python<3.8.0a0,>=3.7 problem was perhaps just a bug, installed the final two packages with python -m pip install --no-deps

I then to test the install opened a python prompt and got a DLL load failed.

C:\Miniconda3\wheels>python
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python3\lib\site-packages\gi\__init__.py", line 42, in <module>
    from . import _gi
ImportError: DLL load failed: The specified module could not be found.

If the set of wheels I produced would be useful for diagnostics, just provide a place to send them and I will. It is about 50mb in total.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
scopatzcommented, Sep 12, 2019

Thanks @CeruleanSky! I’ll be taking a look ASAP

1reaction
CeruleanSkycommented, Sep 11, 2019

Thank you for your response. I did try the --exclude-deps libffi but I suppose I didn’t go far enough.

I am perhaps still using your program wrong, but here I am trying those additional arguments 3 ways, they failed with conflicts, the logs are attached.

Try 1 with pygobject=3.30.5=py37h5e4a255_0: python -m conda_press --exclude-deps vc glib libffi --subdir win-64 pygobject=3.30.5=py37h5e4a255_0

try1 log

Try 2 with just pygobject=3.30.5: python -m conda_press --exclude-deps vc glib libffi --subdir win-64 pygobject=3.30.5

try2 log

Try 3 I added libffi pycairo libiconv gobject-introspection python just to see what would happen:

try3 log


I switched to focusing on the tar.bz2 in the package directory and it did produce a wheel.

Try 4: (base) C:\Miniconda3\wheels\exclude_deps>python -m conda_press --exclude-deps vc glib libffi --subdir win-64 ..\..\pkgs\pygobject-3.30.5-py37h5e4a255_0.tar.bz2

pygobject-3.30.5-0_py37h5e4a255-cp37-cp37m-win_amd64.zip

But when I tried to install it:

C:\Miniconda3\wheels\exclude_deps>pip install pygobject-3.30.5-0_py37h5e4a255-cp37-cp37m-win_amd64.whl
Processing c:\miniconda3\wheels\exclude_deps\pygobject-3.30.5-0_py37h5e4a255-cp37-cp37m-win_amd64.whl
Collecting pycairo (from pygobject==3.30.5)
  Using cached https://files.pythonhosted.org/packages/48/20/5e83af98eb897935bf7dc39455e892ba866feebb9b7c3b392982866f9958/pycairo-1.18.1.tar.gz
Collecting python<3.8.0a0,>=3.7 (from pygobject==3.30.5)
  ERROR: Could not find a version that satisfies the requirement python<3.8.0a0,>=3.7 (from pygobject==3.30.5) (from versions: none)
ERROR: No matching distribution found for python<3.8.0a0,>=3.7 (from pygobject==3.30.5)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Converting pygobject to a wheel · Issue #29 - GitHub
I had some difficulty converting pygobject into a wheel. Perhaps I missed a step or there is a command I needed to use...
Read more >
Could not build wheels for PyGObject which use PEP 517 and ...
Could not build wheels for PyGObject which use PEP 517 and cannot be installed directly. #358 (closed) (This solution doesn't solve problem ...
Read more >
Porting from Static Bindings - PyGObject - Read the Docs
If your code contains imports like import gtk , import gst , import glib or import gobject you are using the old bindings...
Read more >
Error intstalling AppKit: Could not build wheels for pygobject ...
I have been trying to install AppKit but keep on getting this error: Failed building wheel for pygobject Running setup ...
Read more >
PyGObject - 一译
pygi-convert.sh: Add GStreamer rules (Christoph Reiter) (bz#697951) ... sudo zypper install -y python3-venv python3-wheel gobject-introspection ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found