Compilation error - no module named os

Michael Hudson mwh at python.net
Wed Jul 3 11:04:13 EDT 2002


"Michal Cernoevic" <michal.cernoevic at pvt.cz> writes:

> Excuse my question, but I am unable to compile Python 2.2.1 on Linux
> 2.4.9-31.
> 
> I only did tar, cd Python-2.2.1; ./configure; make
> 
> and the compilation finished so:
> 
> *-s*) CC='gcc' LDSHARED='gcc -shared'
> OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py -q
> build;; \
> *) CC='gcc' LDSHARED='gcc -shared'
> OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py
> build;; \
> esac
> Could not find platform independent libraries <prefix>
> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
> 'import site' failed; use -v for traceback
> Traceback (most recent call last):
>   File "./setup.py", line 6, in ?
>     import sys, os, getopt
> ImportError: No module named os
> make: *** [sharedmods] Error 1
> 
> Thanks for some ideas.

Something is pretty broken.  Try

$ ./python -E -v

and see what happens.

Cheers,
M.

-- 
  For every complex problem, there is a solution that is simple,
  neat, and wrong.                                    -- H. L. Mencken



More information about the Python-list mailing list