Ubuntu 14.04 LTS中的PyObject Pycharm安装失败



HI我无法在pycharm项目中设置pyobject。当我试图在我的项目错误消息中添加PyGObject包时,我得到了以下信息。

Pycharm控制台错误消息

Collecting PyGObject
Using cached https://files.pythonhosted.org/packages/8c/1f/76533985b054473ef6ab1ba4d9c00d62da502f8b43d3171ae588ec81ae93/PyGObject-3.30.4.tar.gz
Requirement already satisfied: pycairo>=1.11.1 in /home/ritwik/PycharmProjects/WeatherApp/venv/lib/python3.6/site-packages (from PyGObject) (1.18.0)
Installing collected packages: PyGObject
Running setup.py install for PyGObject: started
Running setup.py install for PyGObject: finished with status 'error'
Complete output from command /home/ritwik/PycharmProjects/WeatherApp/venv/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pycharm-packaging/PyGObject/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-tlwks9ju/install-record.txt --single-version-externally-managed --compile --install-headers /home/ritwik/PycharmProjects/WeatherApp/venv/include/site/python3.6/PyGObject:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/pygtkcompat
copying pygtkcompat/pygtkcompat.py -> build/lib.linux-x86_64-3.6/pygtkcompat
copying pygtkcompat/generictreemodel.py -> build/lib.linux-x86_64-3.6/pygtkcompat
copying pygtkcompat/__init__.py -> build/lib.linux-x86_64-3.6/pygtkcompat
creating build/lib.linux-x86_64-3.6/gi
copying gi/pygtkcompat.py -> build/lib.linux-x86_64-3.6/gi
copying gi/_signalhelper.py -> build/lib.linux-x86_64-3.6/gi
copying gi/__init__.py -> build/lib.linux-x86_64-3.6/gi
copying gi/_constants.py -> build/lib.linux-x86_64-3.6/gi
copying gi/types.py -> build/lib.linux-x86_64-3.6/gi
copying gi/docstring.py -> build/lib.linux-x86_64-3.6/gi
copying gi/module.py -> build/lib.linux-x86_64-3.6/gi
copying gi/_gtktemplate.py -> build/lib.linux-x86_64-3.6/gi
copying gi/_option.py -> build/lib.linux-x86_64-3.6/gi
copying gi/_propertyhelper.py -> build/lib.linux-x86_64-3.6/gi
copying gi/importer.py -> build/lib.linux-x86_64-3.6/gi
copying gi/_ossighelper.py -> build/lib.linux-x86_64-3.6/gi
copying gi/_compat.py -> build/lib.linux-x86_64-3.6/gi
copying gi/_error.py -> build/lib.linux-x86_64-3.6/gi
creating build/lib.linux-x86_64-3.6/gi/repository
copying gi/repository/__init__.py -> build/lib.linux-x86_64-3.6/gi/repository
creating build/lib.linux-x86_64-3.6/gi/overrides
copying gi/overrides/GIMarshallingTests.py -> build/lib.linux-x86_64-3.6/gi/overrides
copying gi/overrides/__init__.py -> build/lib.linux-x86_64-3.6/gi/overrides
copying gi/overrides/Gdk.py -> build/lib.linux-x86_64-3.6/gi/overrides
copying gi/overrides/Pango.py -> build/lib.linux-x86_64-3.6/gi/overrides
copying gi/overrides/GLib.py -> build/lib.linux-x86_64-3.6/gi/overrides
copying gi/overrides/GObject.py -> build/lib.linux-x86_64-3.6/gi/overrides
copying gi/overrides/Gio.py -> build/lib.linux-x86_64-3.6/gi/overrides
copying gi/overrides/keysyms.py -> build/lib.linux-x86_64-3.6/gi/overrides
copying gi/overrides/Gtk.py -> build/lib.linux-x86_64-3.6/gi/overrides
copying gi/overrides/GdkPixbuf.py -> build/lib.linux-x86_64-3.6/gi/overrides
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
Requested 'gobject-introspection-1.0 >= 1.46.0' but version of gobject-introspection is 1.40.0
Command '('pkg-config', '--print-errors', '--exists', 'gobject-introspection-1.0 >= 1.46.0')' returned non-zero exit status 1.
----------------------------------------
Command "/home/ritwik/PycharmProjects/WeatherApp/venv/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pycharm-packaging/PyGObject/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-tlwks9ju/install-record.txt --single-version-externally-managed --compile --install-headers /home/ritwik/PycharmProjects/WeatherApp/venv/include/site/python3.6/PyGObject" failed with error code 1 in /tmp/pycharm-packaging/PyGObject/

我尝试了不同的解决方案,但没有一个对我有效。我还试图通过终端导航到目录,并使用pip命令,但我失败了。请让我知道这个的解决方案是什么

以下是我的项目中已安装的库列表

Schemer 0.2.11  0.2.11
certifi 2018.11.29  2018.11.29
chardet 3.0.4   3.0.4
idna    2.8 2.8
inflection  0.3.1   0.3.1
pip 18.1    18.1
pycairo 1.18.0  1.18.0
pymongo 3.7.2   
requests    2.20.1  2.20.1
setuptools  40.6.2  40.6.2
urllib3 1.24.1  1.24.1

我还可以在我的系统中本地创建GTK项目,但不能在pycharm中创建。

请帮忙感谢

再次查看错误消息,特别是这部分:

Requested 'gobject-introspection-1.0 >= 1.46.0' but version of gobject-introspection is 1.40.0
Command '('pkg-config', '--print-errors', '--exists', 'gobject-introspection-1.0 >= 1.46.0')' returned non-zero exit status 1.

它说你试图得到一个>=1.46.0的版本,但现有的版本是1.40.0。您不能使用比现有版本更高的版本。所以,你或你正在导入的东西都试图导入一个不存在的版本。我会尝试更改版本,它应该会起作用!

最新更新