# python header not found



## sk8harddiefast (Mar 11, 2010)

hi!
i want to update my system but i have this problem.
portmaster -a stops on gobject-introspection with the error that python header not found
On this forum,somewhere i read to make rmconfig but this didnt work for me 
Any ideas what i should do to fix that?
A have made a lot of tries and formats this days but i can not install FreeBSD successfull yet


----------



## fronclynne (Mar 11, 2010)

Hmm, it works fine here.  Do you have python installed?  If you do, you might want to set PYTHON_DEFAULT_VERSION= python<something> in /etc/make.conf.


----------



## sk8harddiefast (Mar 11, 2010)

i set 2 lines in /etc/make.conf

```
PYTHON_VERSION=		2.6
PYTHON_DEFAULT_VERSION=	2.6
```
but now says:*pth.h ,no such file or directory*
also pth.h exists in folder /usr/local/include/pth/


----------



## fronclynne (Mar 12, 2010)

I think you want 
	
	



```
PYTHON_DEFAULT_VERSION= python2.6
```
 (I really don't know what it thinks it needs, but that works here)

(& I'm sorry if this is a wild goose chase in any case, since I'm not entirely sure why it isn't finding your headers, but obviously something is amiss in the -I bits of the Makefile)


----------



## sk8harddiefast (Mar 13, 2010)

problem solved by this way:

```
cp /usr/local/include/pth/pth.h  /usr/local/include/python2.6/
```
But now i have this problem with gobject-introspection.
http://forums.freebsd.org/showthread.php?t=12241
This package dont wan't to be installed


----------



## sk8harddiefast (Mar 13, 2010)

Also i forgot.
If this

```
cp /usr/local/include/pth/pth.h  /usr/local/include/python2.6/
```
will not solve the problem,try this:

```
cp /usr/local/lib/pth/* /usr/local/lib/
```
The solution is one of this 2 but i am not 100% witch one because i forgot.So i told to post both of them


----------



## colstrom (Aug 10, 2010)

Ran into the same issue with gobject-introspection, the step listed here that resolved it was:


```
cp /usr/local/include/pth/pth.h  /usr/local/include/python2.6/
```

I recall setting the *PTH* option when I built *lang/python26*, so this is likely related to that... maybe a file install or copy that was overlooked in the port?

Sounds like a simple fix, and I'd imagine Chapter 5.14 of the Porter's Handbook is probably a good place for me to start reading up on how to do that.


----------

