5

I am new to programming and for a school project, I need to install pgi 0.0.11.2 package from PyPi. Whenever I try to install the package I get the following error:

Collecting pgi
  Using cached pgi-0.0.11.2.tar.gz (239 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\user\AppData\Local\Temp\pip-install-5ymvp6rm\pgi_e8fc2c7d05e54b1083386e9ca52df18f\setup.py", line 18, in <module>
          import pgi
        File "C:\Users\user\AppData\Local\Temp\pip-install-5ymvp6rm\pgi_e8fc2c7d05e54b1083386e9ca52df18f\pgi\__init__.py", line 10, in <module>
          from .importer import require_version, get_required_version
        File "C:\Users\user\AppData\Local\Temp\pip-install-5ymvp6rm\pgi_e8fc2c7d05e54b1083386e9ca52df18f\pgi\importer.py", line 15, in <module>
          from .clib.gir import GIRepository
        File "C:\Users\user\AppData\Local\Temp\pip-install-5ymvp6rm\pgi_e8fc2c7d05e54b1083386e9ca52df18f\pgi\clib\gir\__init__.py", line 8, in <module>
          from .giargument import GIArgument
        File "C:\Users\user\AppData\Local\Temp\pip-install-5ymvp6rm\pgi_e8fc2c7d05e54b1083386e9ca52df18f\pgi\clib\gir\giargument.py", line 9, in <module>
          from ..glib import gboolean, gint8, guint8, gint16, guint16, gint32, guint32
        File "C:\Users\user\AppData\Local\Temp\pip-install-5ymvp6rm\pgi_e8fc2c7d05e54b1083386e9ca52df18f\pgi\clib\glib.py", line 16, in <module>
          _glib = find_library("glib-2.0")
        File "C:\Users\user\AppData\Local\Temp\pip-install-5ymvp6rm\pgi_e8fc2c7d05e54b1083386e9ca52df18f\pgi\clib\_utils.py", line 99, in find_library
          _internal[name] = cdll.LoadLibrary(_so_mapping[name])
        File "c:\users\user\appdata\local\programs\python\python38\lib\ctypes\__init__.py", line 447, in LoadLibrary
          return self._dlltype(name)
        File "c:\users\user\appdata\local\programs\python\python38\lib\ctypes\__init__.py", line 369, in __init__
          self._handle = _dlopen(self._name, mode)
      FileNotFoundError: Could not find module 'libglib-2.0-0.dll'. Try using the full path with constructor syntax.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Following the error, I tried manually registering libglib-2.0-0.dll following this link. It still gives me the same error.

I have tried to use conda to install pgi but it was no use. I am working on 64-it Windows.

I am actively having a meltdown. I would appreciate any suggestion.

  • I don't have Windows to help you troubleshoot, but there is some extra information you should include that may help. What command are you using to install it? What version of python, pip, etc. do you have installed? How were they installed? I hope with that information, somebody will be able to help assist. And I hope your meltdown abates; life is too short. – theherk Feb 10 '22 at 09:34
  • Are you using conda ? https://anaconda.org/conda-forge/libglib – Lenormju Feb 10 '22 at 13:34
  • I have the very same issue here - did you manage to install `pgi` in the meantime? – Matthias Apr 01 '22 at 10:27

1 Answers1

0

I was able to solve creating a conda environment and installing the libglib through conda first:

conda install -c conda-forge libglib