Distutils doesn't like VPS's (virtual private servers)

tracy s. ruggles trace at reinventnow.com
Tue Jun 12 22:03:23 CEST 2001

Hi, I'm having the darndest time trying to install something on my VPS (a
shared hosting setup that pretends to be its own machine).

The problems seems to be in Distutils/sysconfig.py where it tries to get the
library directories to run the installation.  It spits out /usr/local, but
on a VPS it actually is /usr/home/[user]/usr/local where [user] is your
account name.

So, I tried changing sysconfig.py so that it would prefix anything it spit
out with the proper directory.  But, I mustn't have found everywhere it does
it (or, maybe it's getting a directory listing from some other module).

The output of my attempt to install MySQLdb is below.  You'll notice that
it's looking for:


...which doesn't exist because I've got my own installation of python (since
a VPS won't let me install anything in the shared library folder).  It's
appending /lib/python2.1/ automatically somewhere in the code when it
shouldn't be.

Here's my problem, I need the installation to find the right include
directory for *my* installation of python at ~/usr/bin/python (which is
actually /usr/home/ol0401/usr/bin/python).

Where in the world is the include directory specified.  Or, at least, where
can I override it?

Can anybody help?  Please?



ol0401.vwh.net% ~/usr/bin/python setup.py build
running build
running build_py
not copying CompatMysqldb.py (output up-to-date)
not copying _mysql_exceptions.py (output up-to-date)
not copying MySQLdb/__init__.py (output up-to-date)
not copying MySQLdb/converters.py (output up-to-date)
not copying MySQLdb/connections.py (output up-to-date)
not copying MySQLdb/cursors.py (output up-to-date)
not copying MySQLdb/sets.py (output up-to-date)
not copying MySQLdb/times.py (output up-to-date)
not copying MySQLdb/constants/__init__.py (output up-to-date)
not copying MySQLdb/constants/CR.py (output up-to-date)
not copying MySQLdb/constants/FIELD_TYPE.py (output up-to-date)
not copying MySQLdb/constants/ER.py (output up-to-date)
not copying MySQLdb/constants/FLAG.py (output up-to-date)
not copying MySQLdb/constants/REFRESH.py (output up-to-date)
not copying MySQLdb/constants/CLIENT.py (output up-to-date)
running build_ext
Traceback (most recent call last):
  File "setup.py", line 110, in ?
  File "/usr/home/ol0401/Python-2.1/Lib/distutils/core.py", line 138, in
  File "/usr/home/ol0401/Python-2.1/Lib/distutils/dist.py", line 899, in
  File "/usr/home/ol0401/Python-2.1/Lib/distutils/dist.py", line 919, in
  File "/usr/home/ol0401/Python-2.1/Lib/distutils/command/build.py", line
106, in run
  File "/usr/home/ol0401/usr/local/Python-2.1/Lib/cmd.py", line 328, in
    print "\n"
  File "/usr/home/ol0401/Python-2.1/Lib/distutils/dist.py", line 919, in
  File "/usr/home/ol0401/Python-2.1/Lib/distutils/command/build_ext.py",
line 231, in run
  File "/usr/home/ol0401/usr/local/Python-2.1/Lib/distutils/sysconfig.py",
line 124, in customize_compiler
    (cc, opt, ccshared, ldshared, so_ext) = \
  File "/usr/home/ol0401/usr/local/Python-2.1/Lib/distutils/sysconfig.py",
line 369, in get_config_vars
  File "/usr/home/ol0401/usr/local/Python-2.1/Lib/distutils/sysconfig.py",
line 305, in _init_posix
    raise DistutilsPlatformError, my_msg
distutils.errors.DistutilsPlatformError: invalid Python installation: unable
to open 
/usr/home/ol0401/usr/local/Python-2.1/Lib/lib/python2.1/config/Makefile (No
such file or directory)

More information about the Python-list mailing list