Skip to content

Python 3: ModuleNotFoundError: No module named 'gi' #18

@bittner

Description

@bittner

According to setup.py this projects runs on both Python 2 and Python 3. However, when I try to install WiX.py from PyPI I do get the following error:

$ pip install WiX.py
Collecting WiX.py
  Downloading https://files.pythonhosted.org/packages/88/5f/396e4a819a944e4c878f26dc809d45f93b2775247eb68ed488f97396dd95/WiX.Py-0.1.0.tar.gz (1.6MB)
     |████████████████████████████████| 1.6MB 1.7MB/s 
    ERROR: Command errored out with exit status 1:
     command: /home/peter/.local/share/virtualenvs/PythonTurtle-pecabjcl/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sztrh4os/WiX.py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sztrh4os/WiX.py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /tmp/pip-install-sztrh4os/WiX.py/
    Complete output (13 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-sztrh4os/WiX.py/setup.py", line 28, in <module>
        import wixpy
      File "/tmp/pip-install-sztrh4os/WiX.py/src/wixpy/__init__.py", line 46, in <module>
        from wixpy import model
      File "/tmp/pip-install-sztrh4os/WiX.py/src/wixpy/model.py", line 22, in <module>
        from wixpy import msi
      File "/tmp/pip-install-sztrh4os/WiX.py/src/wixpy/msi.py", line 26, in <module>
        from wixpy import libmsi
      File "/tmp/pip-install-sztrh4os/WiX.py/src/wixpy/libmsi.py", line 20, in <module>
        import gi
    ModuleNotFoundError: No module named 'gi'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I'm running Python 3.6.8 on Ubuntu 18.04.5 LTS. Also, I have both the python-gi and the python3-gi Debian packages installed:

$ dpkg -l | grep -e python-gi -e python3-gi
ii  python-gi           3.26.1-2ubuntu1     amd64      Python 2.x bindings for gobject-introspection libraries
ii  python3-gi          3.26.1-2ubuntu1     amd64      Python 3 bindings for gobject-introspection libraries
ii  python3-gi-cairo    3.26.1-2ubuntu1     amd64      Python 3 Cairo bindings for the GObject library

I can import the gi module in my Python 2.7, though, so it's likely that installing with Python 2 will succeed:

$ python
Python 2.7.17 (default, Jul 20 2020, 15:37:01)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>>

The project doesn't seem to have a test suite and pipeline to test against supported Python versions. Is there any documentation saying which requirements must be satisfied for Python 3 installations?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions