TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Martin Koekenberg martin at koekenberg.net
Mon Aug 30 18:25:42 EDT 2004


Hello,

Thanks for alle the help.. but it still dosn't work.

How even, the error has changed a bit :

"/usr/local/bin/python" "/usr/local/zope/Zope-2.7.2-0/setup.py" \
            build
--build-base="/usr/local/zope/Zope-2.7.2-0/build-base/python-2.3"
--build-lib="/usr/local/zope/Zope-2.7.2-0/build-base/python-2.3/build-lib"
--build-scripts="/usr/local/zope/Zope-2.7.2-0/build-base/python-2.3/build-scripts"
--build-temp="/usr/local/zope/Zope-2.7.2-0/build-base/python-2.3/build-temp"
running build
running build_py
running build_ext
Traceback (most recent call last):
  File "/usr/local/zope/Zope-2.7.2-0/setup.py", line 1091, in ?
    distclass=ZopeDistribution,
  File "/usr/local/lib/python2.3/distutils/core.py", line 149, in
setup
    dist.run_commands()
  File "/usr/local/lib/python2.3/distutils/dist.py", line 907, in
run_commands
    self.run_command(cmd)
  File "/usr/local/lib/python2.3/distutils/dist.py", line 927, in
run_command
    cmd_obj.run()
  File "/usr/local/lib/python2.3/distutils/command/build.py", line
107, in run
    self.run_command(cmd_name)
  File "/usr/local/lib/python2.3/distutils/cmd.py", line 333, in
run_command
    self.distribution.run_command(command)
  File "/usr/local/lib/python2.3/distutils/dist.py", line 927, in
run_command
    cmd_obj.run()
  File "/usr/local/lib/python2.3/distutils/command/build_ext.py", line
244, in run
    customize_compiler(self.compiler)
  File "/usr/local/lib/python2.3/distutils/sysconfig.py", line 172, in
customize_compiler
    cc_cmd = cc + ' ' + opt
TypeError: cannot concatenate 'str' and 'NoneType' objects
make: *** [build] Error 1                     

I had an other type error before the env setting :

TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Greetings,

Martin Koekenberg


On 30 Aug 2004 21:31:10 +0200, Hallvard B Furuseth
<h.b.furuseth at usit.uio.no> wrote:

>[Brett C.]
>> Set your environment 'CC' environment variable to gcc and it should go
>> away.
>
>[Martin Koekenberg]
>
>How do I set this environmet variable ??
>I don't have a lot of linux experience ;-)
>
>[Brett C.]
>
>> For Bourne-style shells (BASH, ZSH, etc.) ``export CC=gcc`` will do it
>> for the current shell (won't save it for future use, that requires
>> setting it in your shell's config file.
>
>Nitpick: That works for bash and zsh - and therefore for Martin, since
>he uses Linux - but not for plain non-Linux Bourne 'sh'.  The portable
>Bourne way is
>
>  CC=gcc; export CC
>
>> For CSH style I think it is ``setenv CC gcc`` but I am not sure.
>
>That's right.
>
>And the standard way which works for both Bourne and CSH style, but for
>just one command at a time (in this case ./configure), is
>
>  env CC=gcc ./configure




More information about the Python-list mailing list