[Distutils] Possible bug in Distutils-0.1.2 on Windows

Geza Groma groma@nucleus.szbk.u-szeged.hu
Wed, 12 Jan 2000 12:15:17 +0100


Trying to install the new Numerical package by Distutils-0.1.2 on
Windows NT with MSVC 6.0, I got the following error:

D:\Archives\Python\Numerical-14>python setup.py build
running build
running build_py
not copying Lib\ArrayPrinter.py (output up-to-date)
not copying Lib\FFT.py (output up-to-date)
not copying Lib\LinearAlgebra.py (output up-to-date)
not copying Lib\Matrix.py (output up-to-date)
not copying Lib\MLab.py (output up-to-date)
not copying Lib\Numeric.py (output up-to-date)
not copying Lib\Precision.py (output up-to-date)
not copying Lib\RandomArray.py (output up-to-date)
not copying Lib\UserArray.py (output up-to-date)
running build_ext
C:\Program Files\Microsoft Visual Studio\VC98\bin\cl.exe /nologo
-Ic:\Program Fi
les\Python\include\python1.5 -Ic:\Program Files\Python\include -IInclude
/c /FoS
rc/_numpymodule.obj /TcSrc/_numpymodule.c
Command line warning D4024 : unrecognized source file type
'Files\Python\include
\python1.5', object file assumed
Command line warning D4027 : source file
'Files\Python\include\python1.5' ignore
d
Command line warning D4024 : unrecognized source file type
'Files\Python\include
', object file assumed
Command line warning D4027 : source file 'Files\Python\include' ignored
_numpymodule.c
Src/_numpymodule.c(1) : fatal error C1083: Cannot open include file:
'Python.h':
 No such file or directory
Traceback (innermost last):
  File "setup.py", line 29, in ?
    ext_modules = [('_numpy',
  File "c:\Program Files\Python\distutils\core.py", line 96, in setup
    dist.run_commands ()
  File "c:\Program Files\Python\distutils\core.py", line 442, in
run_commands
    self.run_command (cmd)
  File "c:\Program Files\Python\distutils\core.py", line 491, in
run_command
    cmd_obj.run ()
  File "c:\Program Files\Python\distutils\command\build.py", line 52, in
run
    self.run_peer ('build_ext')
  File "c:\Program Files\Python\distutils\core.py", line 802, in
run_peer
    self.distribution.run_command (command)
  File "c:\Program Files\Python\distutils\core.py", line 491, in
run_command
    cmd_obj.run ()
  File "c:\Program Files\Python\distutils\command\build_ext.py", line
146, in ru
n
    self.build_extensions (self.extensions)
  File "c:\Program Files\Python\distutils\command\build_ext.py", line
209, in bu
ild_extensions
    include_dirs=include_dirs)
  File "c:\Program Files\Python\distutils\msvccompiler.py", line 103, in
compile

    self.spawn ([self.cc] + cc_args)
  File "C:\Program Files\Python\distutils\ccompiler.py", line 421, in
spawn
    spawn (cmd, verbose=self.verbose, dry_run=self.dry_run)
  File "c:\Program Files\Python\distutils\spawn.py", line 37, in spawn
    _spawn_nt (cmd, search_path, verbose, dry_run)
  File "c:\Program Files\Python\distutils\spawn.py", line 68, in
_spawn_nt
    raise DistutilsExecError("command failed: %d" % rc)
distutils.errors.DistutilsExecError: command failed: 2

I guess the problem is that cl.exe does not accept a directory name
including spaces in its argument list unless in quotation marks. In the
above example

-Ic:\Program Files\Python\include\python1.5

should be written as

-I"c:\Program Files\Python\include\python1.5"

I am not a member of this list, so please, cc all responses to my
private e-mail address.

Thanks,
Geza Groma