[SOLVED] how to reinstall missing python header files on gentoo?
GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how to reinstall missing python header files on gentoo?
Hi.
This thread is a follow-up of this one. This problem is far more general than first thought, as it does not only affect pidgin (see linked thread), but many other packages as well, hence the new thread.
So the problem is, that right now I have at least 2 (possibly more) missing python header files: python.h and pyconfig.h. This prevents me from (r)emereging certain packages, like pidgin and dev-python/setuptools and possibly many others that need one of these header files.
Thus my questions are:
- how to reinstall these header files?
- which package(s) provide these header files?
- how to reinstall all python related packages?
FYI: eselect-ing another active python version and then running python-updater does not help.
(didn't read your other thread)
pyconfig.h:
"emerge python" should be enough, no?
python.h
I do have a few versions of Python installed on Gentoo on a couple of PCs/notebooks, but I don't have that file ("find / -name python.h").
For what do you need it?
Well, as it turns out, I too have pyconfig.h and it seems to be in the right place. Unfortunately, when I try to recompile pygobject, it doesn't look for this header file in the right location. The header file is in /usr/include/python2.7/pyconfig.h but for some unknown reason when pygobject compiles, it looks for it in /usr/bin/include/python2.7/pyconfig.h which path obviously does not exist. How can I fix that? Is there a way to reset it?
python.h is needed for Pidgin recompilation, although I'm not sure why. While pygobject compilation fails at the initial checking phase, pidgin fails after some compilation. By checking the last few lines of the process it is obvious again, that the compiler looks for python files at the wrong location (path with bin). Very strange...
I'm not sure if it is a real solution, but creating a symlink of /usr/include to /usr/bin seems to have solved all my problems. Everything compiles now as it should. Maybe it is only a workaround, but hey, it works.
Yup, that's strange.
Which version of pygobject are you trying to emerge (and with which use-flags)?
And with which python version? (which one is active in "eselect python list")
I'm currently using python3.3 as default, although changing that to 3.4 or 2.7 (originally it was set to 2.7) does not help. Not even with running python-updater (it says everything is OK) after each change.
I tried to compile pygobject 3.14.0 with the cairo, python_targets_python2_7 and python_targets_python3_3 use-flags.
I suspect that some global python path setting got mixed up somewhere, and that is what I should find and correct. I just have no idea where it is...
The good news is, that the workaround works flawlessly so far, so I'm not rushed to make the proper fix
So, I have emerged 3.14.0 (on amd64 arch) with the use-flags "cairo python2_7 python3_3 python3_4" (currently selected 3.3 in eselect) and didn't have any problems while emerging.
If the setup is the same for you then some symlink is missing OR the Pidgin package looks for something that does not exist.
I would tend to exclude the 2nd possibility - many people would have complained by now.
Concerning case #1: how can I look for symlinks that point to that file or to its parent directory?
Otherwise you could just postpone all this stuff - whenever some other installation wants to overwrite your symlink you'll get a warning and you'll have to delete it manually.
Well, it went smoothly for you. This much I expected. I really think some variable or something got mixed in my system, and that was causing all the python related troubles. All these errors got nothing to do with actual packages.
Thus as long as there are no extra troubles, I think I'll just postpone the stuff, as the symlink I created seems to be quite harmless.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.