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

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

Open
bittner opened this issue Aug 30, 2020 · 1 comment
Open

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

bittner opened this issue Aug 30, 2020 · 1 comment

Comments

@bittner
Copy link

bittner commented Aug 30, 2020

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?

@bittner
Copy link
Author

bittner commented Aug 30, 2020

I see that there are 2 PRs open, #15 and #17. Can they be merged?

Installing with the changes from #17 worked for me:

$ pip install git+https://github.com/shimondoodkin/wixpy@patch-1#egg=Wix.py
$ wix.py 

WiX.Py 0.1

Cross-platform MSI builder
Copyright (C) 2018 sK1 Project Team (https://wix.sk1project.net)

Usage: wix.py [OPTIONS] [INPUT FILE]
Example: wix.py myapp.json

Available options:
 --help                Display this help and exit
 --xml_only            Generate WXS representation of MSI package
 --stdout              Show generated WXS representation
 --output=FILE         Resulted MSI/WXS filename
 --xml_encoding=ENC    WXS content encoding. Default "utf-8"
 --json_encoding=ENC   JSON content encoding. Default "utf-8"

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

1 participant