G
Guest
Hello,
I tried to build Python 2.4.1 on a Reliant Unix system. Just after the
python executable program has been built, I get the following error:
==== begin make output ===
CC -W1 -Blargedynsym -o python \
Modules/python.o \
libpython2.4.a -lresolv -lsocket -lnsl -ldl
-lm
case $MAKEFLAGS in \
*-s*) CC='cc' LDSHARED='ld' OPT='-DNDEBUG -O' ./python -E
../setup.py -q build;; \
*) CC='cc' LDSHARED='ld' OPT='-DNDEBUG -O' ./python -E
../setup.py build;; \
esac
Traceback (most recent call last):
File "./setup.py", line 1088, in ?
class PyBuildInstallLib(install_lib):
File "./setup.py", line 1094, in PyBuildInstallLib
so_ext = sysconfig.get_config_var("SO")
File "/build_dir/Python-2.4.1/Lib/distutils/sysconfig.py", line 511,
in get_config_var
return get_config_vars().get(name)
File "/build_dir/Python-2.4.1/Lib/distutils/sysconfig.py", line 488,
in get_config_vars
func()
File "/build_dir/Python-2.4.1/Lib/distutils/sysconfig.py", line 358,
in _init_posix
raise DistutilsPlatformError(my_msg)
distutils.errors.DistutilsPlatformError: invalid Python installation:
unable to open /usr/local/lib/python2.4/config/Makefile (No such file or
directory)
make: *** Error code 1
make: Fatal error.
==== end make output ===
It is strange that the Makefile complains about /usr/local/lib/python2.4
since this is still the build phase, far away from the installation into
/usr/local.
I used the python executable from the build directory to run the
following program:
import os
def main():
if not (os.path.exists("/")):
print "/ does not exist"
else:
print "/ exists"
if not (os.path.isdir("/")):
print "/ is not a directory"
else:
print "/ ok"
if __name__ == "__main__":
main()
The output is:
/ exists
/ is not a directory
It's the same for every (existing) directory name I try: os.path.isdir()
always returns false.
It looks as if the stat results are not recognised: os.path.exists()
works, but all the functions os.path.isdir(), os.path.isfile() etc.
don't.
Could anyone help me to solve the problem?
- Servatius
I tried to build Python 2.4.1 on a Reliant Unix system. Just after the
python executable program has been built, I get the following error:
==== begin make output ===
CC -W1 -Blargedynsym -o python \
Modules/python.o \
libpython2.4.a -lresolv -lsocket -lnsl -ldl
-lm
case $MAKEFLAGS in \
*-s*) CC='cc' LDSHARED='ld' OPT='-DNDEBUG -O' ./python -E
../setup.py -q build;; \
*) CC='cc' LDSHARED='ld' OPT='-DNDEBUG -O' ./python -E
../setup.py build;; \
esac
Traceback (most recent call last):
File "./setup.py", line 1088, in ?
class PyBuildInstallLib(install_lib):
File "./setup.py", line 1094, in PyBuildInstallLib
so_ext = sysconfig.get_config_var("SO")
File "/build_dir/Python-2.4.1/Lib/distutils/sysconfig.py", line 511,
in get_config_var
return get_config_vars().get(name)
File "/build_dir/Python-2.4.1/Lib/distutils/sysconfig.py", line 488,
in get_config_vars
func()
File "/build_dir/Python-2.4.1/Lib/distutils/sysconfig.py", line 358,
in _init_posix
raise DistutilsPlatformError(my_msg)
distutils.errors.DistutilsPlatformError: invalid Python installation:
unable to open /usr/local/lib/python2.4/config/Makefile (No such file or
directory)
make: *** Error code 1
make: Fatal error.
==== end make output ===
It is strange that the Makefile complains about /usr/local/lib/python2.4
since this is still the build phase, far away from the installation into
/usr/local.
I used the python executable from the build directory to run the
following program:
import os
def main():
if not (os.path.exists("/")):
print "/ does not exist"
else:
print "/ exists"
if not (os.path.isdir("/")):
print "/ is not a directory"
else:
print "/ ok"
if __name__ == "__main__":
main()
The output is:
/ exists
/ is not a directory
It's the same for every (existing) directory name I try: os.path.isdir()
always returns false.
It looks as if the stat results are not recognised: os.path.exists()
works, but all the functions os.path.isdir(), os.path.isfile() etc.
don't.
Could anyone help me to solve the problem?
- Servatius