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

updating pygobject #85

Closed
blap opened this issue Dec 9, 2017 · 5 comments
Closed

updating pygobject #85

blap opened this issue Dec 9, 2017 · 5 comments

Comments

@blap
Copy link

blap commented Dec 9, 2017

When updating pygobject via pip in LinuxMint ("sudo pip install -U pygobject" or "sudo -H pip install -U pygobject"), I get this error:

Collecting pygobject
  Using cached pygobject-3.27.0.tar.gz
Requirement already up-to-date: pycairo>=1.11.1 in /usr/local/lib/python2.7/dist-packages (from pygobject)
Installing collected packages: pygobject
  Found existing installation: pygobject 3.20.0
    DEPRECATION: Uninstalling a distutils installed project (pygobject) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling pygobject-3.20.0:
      Successfully uninstalled pygobject-3.20.0
  Running setup.py install for pygobject ... error
...
gi/pygi-foreign-cairo.c:28:21: fatal error: pycairo.h: Arquivo ou diretório não encontrado
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

How can I solve this?
"pip list" show pycairo (1.15.4) and pygobject (3.20.0)

@lazka
Copy link
Member

lazka commented Dec 9, 2017

Uh, I don't think messing with the dpkg managed packages through pip is a good idea. Always use a virtualenv or install into your user directory. You'll break your system..

In pygobject (which is on pypi since yesterday, and kinda experimental) we only look in the default location for pycairo atm, which I guess is the reason it fails. I'll see if I can find a better approach.

Is your pygobject 3.20 installed through apt?

@blap
Copy link
Author

blap commented Dec 9, 2017

Yes, from apt
sudo apt-get install python-gobject

@lazka
Copy link
Member

lazka commented Dec 9, 2017

Thanks, I'll try to get this fixed in pygobject in the coming days.

(it's apt install python-gi)

gnomesysadmins pushed a commit to GNOME/pygobject that referenced this issue Dec 10, 2017
Two problems with the previous approach:

* We looked into sys.prefix for the .pc file while the package
  could be installed in another location like the user dir location
  or on Debian it goes into /usr/local.
* The .pc file intalled by pycairo can contain wrong paths if
  installed through pip, since that sometimes builds a wheel
  and caches that for future installations to different locations.

Instead of using the .pc file use pkg_resources to discover the
pycairo location and then try to find the correspinding "data" installation
path for the first  matching location scheme.

See pygobject/pycairo#85
@lazka
Copy link
Member

lazka commented Dec 11, 2017

The new pygobject on pypi should work better

@lazka
Copy link
Member

lazka commented Dec 15, 2017

@blap Can you maybe test that it works now? If you don't care that's ok too and I'll just close this.

@lazka lazka closed this as completed Dec 23, 2017
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

2 participants