PyObject Ошибка установки Pycharm в Ubuntu 14.04 LTS - PullRequest
0 голосов
/ 09 декабря 2018

HI Я не могу настроить pyobject в моем проекте pycharm.Я получаю следующее, когда пытаюсь добавить пакет 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('\r\n', '\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('\r\n', '\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.

Пожалуйста, помогите Спасибо

1 Ответ

0 голосов
/ 09 декабря 2018

Посмотрите на ваше сообщение об ошибке еще раз, в частности на эту часть:

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.Вы не можете использовать версию выше той, которая существует.Таким образом, вы или импортируемая вами вещь пытаетесь импортировать несуществующую версию.Я бы попробовал сменить версию и она должна работать!

...