Я использую Python версии 3.7 в 64-битной системе Windows 10.
Я пытаюсь установить пакет с именем PyGObject, но не могу этого сделать.Я получаю следующую ошибку.
C:\Users\mukar>pip install PyGObject
Collecting PyGObject
Using cached https://files.pythonhosted.org/packages/00/17/198a9d0eb0e89b5c7d2a9b4437eb40d62702ab771030cd79fc7141cb0d30/PyGObject-3.30.1.tar.gz
Requirement already satisfied: pycairo>=1.11.1 in c:\users\mukar\appdata\local\programs\python\python37\lib\site-packages (from PyGObject) (1.17.1)
Installing collected packages: PyGObject
Running setup.py install for PyGObject ... error
Complete output from command c:\users\mukar\appdata\local\programs\python\python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\mukar\\AppData\\Local\\Temp\\pip-install-srfolyoj\\PyGObject\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\mukar\AppData\Local\Temp\pip-record-x4gbheju\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pygtkcompat
copying pygtkcompat\generictreemodel.py -> build\lib.win-amd64-3.7\pygtkcompat
copying pygtkcompat\pygtkcompat.py -> build\lib.win-amd64-3.7\pygtkcompat
copying pygtkcompat\__init__.py -> build\lib.win-amd64-3.7\pygtkcompat
creating build\lib.win-amd64-3.7\gi
copying gi\docstring.py -> build\lib.win-amd64-3.7\gi
copying gi\importer.py -> build\lib.win-amd64-3.7\gi
copying gi\module.py -> build\lib.win-amd64-3.7\gi
copying gi\pygtkcompat.py -> build\lib.win-amd64-3.7\gi
copying gi\types.py -> build\lib.win-amd64-3.7\gi
copying gi\_compat.py -> build\lib.win-amd64-3.7\gi
copying gi\_constants.py -> build\lib.win-amd64-3.7\gi
copying gi\_error.py -> build\lib.win-amd64-3.7\gi
copying gi\_gtktemplate.py -> build\lib.win-amd64-3.7\gi
copying gi\_option.py -> build\lib.win-amd64-3.7\gi
copying gi\_ossighelper.py -> build\lib.win-amd64-3.7\gi
copying gi\_propertyhelper.py -> build\lib.win-amd64-3.7\gi
copying gi\_signalhelper.py -> build\lib.win-amd64-3.7\gi
copying gi\__init__.py -> build\lib.win-amd64-3.7\gi
creating build\lib.win-amd64-3.7\gi\repository
copying gi\repository\__init__.py -> build\lib.win-amd64-3.7\gi\repository
creating build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\Gdk.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\GdkPixbuf.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\GIMarshallingTests.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\Gio.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\GLib.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\GObject.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\Gtk.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\keysyms.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\Pango.py -> build\lib.win-amd64-3.7\gi\overrides
copying gi\overrides\__init__.py -> build\lib.win-amd64-3.7\gi\overrides
running build_ext
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\mukar\AppData\Local\Temp\pip-install-srfolyoj\PyGObject\setup.py", line 1189, in <module>
main()
File "C:\Users\mukar\AppData\Local\Temp\pip-install-srfolyoj\PyGObject\setup.py", line 1184, in main
zip_safe=False,
File "c:\users\mukar\appdata\local\programs\python\python37\lib\site-packages\setuptools\__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "c:\users\mukar\appdata\local\programs\python\python37\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\mukar\appdata\local\programs\python\python37\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\mukar\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\mukar\appdata\local\programs\python\python37\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\mukar\appdata\local\programs\python\python37\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\mukar\appdata\local\programs\python\python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\mukar\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\mukar\appdata\local\programs\python\python37\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\mukar\appdata\local\programs\python\python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\mukar\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\mukar\AppData\Local\Temp\pip-install-srfolyoj\PyGObject\setup.py", line 1024, in run
self._setup_extensions()
File "C:\Users\mukar\AppData\Local\Temp\pip-install-srfolyoj\PyGObject\setup.py", line 1010, in _setup_extensions
add_ext_compiler_flags(gi_ext, compiler)
File "C:\Users\mukar\AppData\Local\Temp\pip-install-srfolyoj\PyGObject\setup.py", line 881, in add_ext_compiler_flags
cache_key = compiler.compiler[0]
AttributeError: 'MSVCCompiler' object has no attribute 'compiler'
----------------------------------------
Command "c:\users\mukar\appdata\local\programs\python\python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\mukar\\AppData\\Local\\Temp\\pip-install-srfolyoj\\PyGObject\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\mukar\AppData\Local\Temp\pip-record-x4gbheju\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\mukar\AppData\Local\Temp\pip-install-srfolyoj\PyGObject\
Я пытался искать везде, но не мог найти никакого решения.Я даже пытался установить это на Python версий 3.4 и 2.7, но все же не повезло.Я использую PyCharm IDE.
Любая помощь будет принята с благодарностью!