Problems compiling/installing 2.1 on Linux
Johann Spies
jhspies at adept.co.za
Tue May 8 16:08:54 EDT 2001
Kalle Svensson <kalle at gnupung.net> writes:
> Sez Johann Spies:
> > I get the following error message after ./configure;make on a Debian
> > Potato System on which I have Python 1.5.2 installed:
> > ----------------------------------------------
> > PYTHONPATH= ./python ./setup.py build
> > 'import site' failed; use -v for traceback
> > Traceback (most recent call last):
> > File "./setup.py", line 9, in ?
> > import sys, os, getopt
> > ImportError: No module named os
> > make: *** [sharedmods] Error 1
> > ---------------------------------------------
> >
> > Can somebody help me to correct this please?
>
> This problem occurs when the environment variable PYTHONHOME is set.
> Check http://groups.google.com/groups?ic=1&th=7aeb0b4f68d72a9d,9
Thanks Kalle for the reference, but there are still some problems:
1. The documentation was not installed by "make install".
2. "make test" resulted in
---------------------------]
root-21:59:08-/usr/local/src/Python-2.1$make test
find ./Lib -name '*.py[co]' -print | xargs rm -f
PYTHONPATH= ./python -tt ./Lib/test/regrtest.py -l
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "./Lib/test/regrtest.py", line 36, in ?
import os
ImportError: No module named os
make: [test] Error 1 (ignored)
PYTHONPATH= ./python -tt ./Lib/test/regrtest.py -l
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "./Lib/test/regrtest.py", line 36, in ?
import os
ImportError: No module named os
make: *** [test] Error 1
--------------------------------------------------
3. When I cd to the /usr/local/src/Python-2.1/Doc and type make:
-------------------------------------------
...
Loading /usr/share/latex2html/versions/latin1.pl
*** Fatal Error --- but easy to fix ***
Cannot have '.' in file-name prefix, else dvips fails on images
Change the name from /usr/local/src/Python-2.1/Doc/dist/dist.tex and
try again.
*** Session transcript and error messages are in dist.how.
DATE=`grep '\\date{' texinputs/boilerplate.tex | sed
's/.*\\date{\(.*\)}.*$/\1/'` ; \
if [ "$DATE" = '\today' ] ; then DATE=`date '+%B %e, %Y'`;fi;\
sed -e "s/@DATE@/$DATE/g" -e "s/@RELEASE@/2.1/g" \
html/index.html.in >html/index.html
(cd html; \
../tools/mkmodindex --columns 4 --output modindex.html \
--address 'See <i><a href="about.html">About this
document...</a></i> for information on suggesting changes.' \
lib/modindex.html mac/modindex.html)
Traceback (most recent call last):
File "../tools/mkmodindex", line 136, in ?
main()
File "../tools/mkmodindex", line 91, in main
ifp = open(ifn)
IOError: [Errno 2] No such file or directory: 'lib/modindex.html'
make: *** [html/modindex.html] Error 1
-----------------------------------------------------
This is a bit frustrating. There are no Debian packages available,
the Redhat packages as far as I could see, was only for 7.x which is
not compatible with Debian Potato and the original Python-2.1.tgz
resulted in a lot of wasted time and effort trying to install it.
Is there another way to get Python 2.1 working on my system?
Johann
--
J.H. Spies - Tel. 082 782 0336. Posbus 4668, Tygervallei 7536
"Follow peace with all men, and holiness, without which
no man shall see the Lord." Hebrews 12:14
More information about the Python-list
mailing list