Page 1 of 1

What does this python error mean?

Posted: Tue 22 Feb 2011, 14:40
by AF Branden
Just tried to compile a program with my new python installation and got this error:

Code: Select all

# cd /root/my-documents/ajobs/gameproject1/pyinstaller-1.4/source/linux
# python ./Make.py
Traceback (most recent call last):
  File "./Make.py", line 207, in <module>
    main()
  File "./Make.py", line 102, in main
    binlib = sysconfig.get_config_vars('LIBDIR')[0]
  File "/usr/lib/python2.6/distutils/sysconfig.py", line 521, in get_config_vars
    func()
  File "/usr/lib/python2.6/distutils/sysconfig.py", line 389, in _init_posix
    raise DistutilsPlatformError(my_msg)
distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /usr/include/python2.6/pyconfig.h (No such file or directory)
# 
What does this mean?

Posted: Tue 22 Feb 2011, 17:22
by big_bass
distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /usr/include/python2.6/pyconfig.h (No such file or directory)



looks like you dont have the development header files
or after you installed you didnt run ldconfig to update them

Joe

Posted: Wed 23 Feb 2011, 00:45
by AF Branden
Thanks, I got the dev files but now theres a new error:

Code: Select all

# cd /root/my-documents/ajobs/gameproject1/pyinstaller-1.4/source/linux
# python ./Make.py
Using '/usr/lib/python2.6/config/Makefile' as Makefile template
Now run "make" to build the targets: ../../support/loader/run ../../support/loader/run_d
# python make
python2.6: can't open file 'make': [Errno 2] No such file or directory
# 
I'm just a beginner and never compiled anything before.
Maybe i'm missing something again?

Posted: Wed 23 Feb 2011, 01:20
by technosaurus
Just "make", not python make

Posted: Wed 23 Feb 2011, 02:10
by AF Branden
Just using make also gives an error:

Code: Select all

# make 
bash: make: command not found
#

Posted: Wed 23 Feb 2011, 02:22
by technosaurus
Then you don't have the devx sfs installed.

Posted: Wed 23 Feb 2011, 02:25
by AF Branden
Haha thanks, I didn't realize you needed to install so much crap just to get into programming.

Edit: Is this one ok?
http://distro.ibiblio.org/pub/linux/dis ... vx_431.sfs

I'm using 4.2.1 full install so I just rename it?

Posted: Wed 23 Feb 2011, 03:07
by technosaurus
AF Branden wrote:Haha thanks, I didn't realize you needed to install so much crap just to get into programming.
technically it is compiling, until you start making modifications to the code, and the devx has most everything you need to compile... including python ...pretty convenient actually.
Edit: Is this one ok?
http://distro.ibiblio.org/pub/linux/dis ... vx_431.sfs

I'm using 4.2.1 full install so I just rename it?
no they are version specific

You will probably run into dependencies missing. Puppy does not use python at all, except in the devx to build/test other non-python apps so you will be searching for them a lot. I put pygtk and its deps in a single pet on Google code.

Posted: Wed 23 Feb 2011, 05:32
by Karl Godt
I put pygtk and its deps in a single pet on Google code
@technosaurus :

I tried to get older sakura compiled today, because aragon had deleted his 2.3.4 version, which is on Macpup F3 by default and which I had managed to run on lupu (c+p) but today I could not install it that way on Macpup Opera2 . I used aragons newer vte-libs and they worked fine , but I wanted to find out which files I possibly would have missed and that was really unsuccessful : several headers had been easy but pygtk.pc I could not find somewhere ( even to 'fake' upgrade the version number manually ) . Some libs and sources seem to have vanished from servers .
( could not find earlier than 2.3.8 an it said libvte>=0.16.15 and I could only find 0.16.13+14 and 0.20+ (0.16 builds, but with really many warnings ) and vte-0.27 wants newer glib-2.26+ and then the trouble began ) . somewhere there should be a pygtk.pc and perhaps I can find it PLEASE !! :)

Btw : I have problems with BB-1.18.3 printf not using floats (pup_event_frontend_d) in the ash and I suspect -lm (math) not set correctly, while configure vte found it [!@#$%!!]

checking for python version... 2.5
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.5/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.5/site-packages
checking for python >= 2.2... okay
checking for headers required to compile python extensions... found
checking for
pygtk-2.0... not found
Python bindings disabled.
checking whether to build gtk-doc documentation... no
checking for gtkdoc-check... no

checking for floor... no
checking for floor in
-lm... yes
checking for ceil... yes
checking for floor... (cached) no

Posted: Wed 23 Feb 2011, 15:47
by technosaurus
http://code.google.com/p/puppy-developm ... 4-i486.pet
http://code.google.com/p/puppy-developm ... 4-i486.pet

This is a version I compiled and included a wrapper script to prevent compiling the .py files to bytecode (.pyc and .pyo) since it nearly triples the size of an already large package (just replace the python wrapper with a symlink to the actual binary if you want the bytecode to compile)

Posted: Wed 23 Feb 2011, 21:52
by runtt21
Karl , the version of sakura in Fox 3 was mine . I made that as a .pet before Aragon released his.I thought he did a better job with it than I did so I pulled my .pet but went ahead and used it in Fox 3. I don't know if I still have it But I will look if you want.

Posted: Thu 24 Feb 2011, 12:50
by Karl Godt
@ runtt21 and technosaurus : Thousand Thanks !!

@ runtt21 : I would appreciate it very much !!
As far as I can overview there are Themes on your page but no other folder for other kind of dotpets .
Actually I am using F3 with (a) 430_devx because O2+431_devx seems to have different kernel headers , so unfortunately some builds don't allow some features I can configure with the 430_devx ; but this may be because 431 had been released with 3 different kernels as far as I am informed .
The sakura of your F3 is performing without any problems ( even if they had build with too much warnings for ones taste ) since 3/4year.
But gcc 4.2.2 , 4.3 , 4.4 seem to throw different or no warnings at the same place .
And ( of course ) I am compiling rather with LIBC_2.6.(1) to have the possibility to test on puppies LIBC>=2.6.1 [Opera2: ./lib/libc-2.6.1.so > "Compiled on a Linux >>2.6.21.7<< system on 2007-10-18." ], but it might be possible to disable the LIBC_VERSION_CHECKING ? .

Posted: Thu 24 Feb 2011, 21:40
by runtt21
Karl you need to message ttuuxxx and see if he still has the devx for 4.31.1 that he built. That was the base for Fox 3 not the regular 4.3.0 . O2 uses the regular 4.3.1 devx. I have uploaded the sakura .pet to my macpup page but it may not work in different puppy than Fox 3 or ttuuxxx's 4.31.1 .

Similar problem when trying to install virtualenv

Posted: Sun 27 Feb 2011, 19:14
by wiggins
EDIT: I HAVE JUST FIXED THE PROBLEM BY DOWNLOADING THE PYTHON_2B_DEV FROM TECHNOSAURUS. THANKS.

BTW: I am still pretty new to linux (second day), could anyone attempt to explain what is the difference with DEV and why it worked?

Hello I am running into a similar error message when I try to setup virtualenv, pip or distribute on my machine. I have downloaded vitualenv and when I type:

$ python virtualenv.py ~venv/base

I get:
raise DistutilsPlatformError(my_mdg)
distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /usr/include/python2.6/pyconfig.h (no such file or directory)

So I have python already installed and I can use it just fine to run programs. The path that python is in is in /usr/bin/python/etc... To fix this do I need to move it into the /usr/include directory? I'm worried what will happen if I do that.

I am using lupu 5.2
python 2.6

Thanks,
wiggins