NumPython and sysconfig problem

Kuokan Liang kiki at kiki3.iams.sinica.edu.tw
Wed Aug 21 00:11:43 EDT 2002


Hi, all,

I tried to install NumPython over python 2.2.1 on RedHat 7.2.
However, it gives me the followin error messages when I run "python
setup.py:

running build_ext
Traceback (most recent call last):
  File "setup.py", line 195, in ?
    ext_modules = ext_modules
  File
"/var/tmp/python2-2.2.1-root/usr/lib/python2.2/distutils/core.py", line
138, in setup
  File
"/var/tmp/python2-2.2.1-root/usr/lib/python2.2/distutils/dist.py", line
893, in run_commands
  File
"/var/tmp/python2-2.2.1-root/usr/lib/python2.2/distutils/dist.py", line
913, in run_command
  File
"/var/tmp/python2-2.2.1-root/usr/lib/python2.2/distutils/command/install.py",
line 491, in run
  File "/usr/lib/python2.2/cmd.py", line 330, in run_command
    print "\n"
  File
"/var/tmp/python2-2.2.1-root/usr/lib/python2.2/distutils/dist.py", line
913, in run_command
  File
"/var/tmp/python2-2.2.1-root/usr/lib/python2.2/distutils/command/build.py",
line 107, in run
  File "/usr/lib/python2.2/cmd.py", line 330, in run_command
    print "\n"
  File
"/var/tmp/python2-2.2.1-root/usr/lib/python2.2/distutils/dist.py", line
913, in run_command
  File
"/var/tmp/python2-2.2.1-root/usr/lib/python2.2/distutils/command/build_ext.py",
line 231, in run
  File
"/var/tmp/python2-2.2.1-root/usr/lib/python2.2/distutils/sysconfig.py",
line 129, in customize_compiler
TypeError: unsupported operand types for +: 'NoneType' and 'str'

I read the source and found the problem is in these lines in
sysconfig.py:

    if compiler.compiler_type == "unix":
        (cc, opt, ccshared, ldshared, so_ext) = \
            get_config_vars('CC', 'OPT', 'CCSHARED', 'LDSHARED', 'SO')

        cc_cmd = cc + ' ' + opt

I tried the similar thing in python 2.2.1 shell interactively,
and those configuration variables 'CC', 'OPT', and so on, are all
absent.
That is why I got 'NoneType' for cc and opt.

I supposed that there be a way of configuring my python installation so
that
it can find these configuration variables.
They are so important that a 'correct' installation of python should
indeed be able
to locate these variables.
Is there any suggestion on how I setup these variable for an existing
installation of python?
Or should I install python again with some extra configuration work than
simply
install through RPM?
And, what usually are the values people should set for 'OPT',
'CCSHARED',
'LDSHARED' and 'SO' ?

Thank you for your help in advance.
If possible, please also reply to my personal account.

Regards,
K.K.Liang
IAMS, Academia Sinica, Taiwan





More information about the Python-list mailing list