python install settings...

Discussion in 'Python' started by jtan325, Jun 30, 2005.

  1. jtan325

    jtan325 Guest

    hi,

    i am running Linux Ubuntu Hoary and am trying to build the Python
    numarray package, v. 1.3.2 by hand since ubuntu's repos won't be
    updated until breezy.

    i have python 2.4, and gcc 3.3.5

    after unpacking the tar, i run "python setup.py install", as it says in
    the installation instructions. i get the following:

    [colfax 53] numarray-1.3.2 > python setup.py install
    Using EXTRA_COMPILE_ARGS = []
    running install
    running build
    running build_py
    copying Lib/numinclude.py -> build/lib.linux-i686-2.4/numarray
    running build_ext
    Traceback (most recent call last):
    File "setup.py", line 222, in ?
    main()
    File "setup.py", line 213, in main
    setup(**p)
    File "/usr/lib/python2.4/distutils/core.py", line 149, in setup
    dist.run_commands()
    File "/usr/lib/python2.4/distutils/dist.py", line 946, in
    run_commands
    self.run_command(cmd)
    File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
    cmd_obj.run()
    File "/usr/lib/python2.4/distutils/command/install.py", line 506, in
    run
    self.run_command('build')
    File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
    File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
    cmd_obj.run()
    File "/usr/lib/python2.4/distutils/command/build.py", line 112, in
    run
    self.run_command(cmd_name)
    File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
    File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
    cmd_obj.run()
    File "/usr/lib/python2.4/distutils/command/build_ext.py", line 254,
    in run
    customize_compiler(self.compiler)
    File "/usr/lib/python2.4/distutils/sysconfig.py", line 174, in
    customize_compiler
    cc_cmd = cc + ' ' + opt
    TypeError: cannot concatenate 'str' and 'NoneType' objects


    I had a similiar (but different) error earlier, but then I learned I
    had to set my "CC" environment variable. So I set that to "gcc". i have
    tried setting my "OPT" setting to something like "-g 02" (no idea what
    it means just found it somewhere, but it still didn't work.

    upon closer inspection of Python's distutils sysconfig.py, is the error
    being caused by the ' ' in "cc_cmd = cc + ' ' + opt"? Any ideas on this
    new error? Are there packages/settings I need to take care of before i
    can use Python's distutils to install stuff?

    Thanks,
    Jason
    jtan325, Jun 30, 2005
    #1
    1. Advertising

  2. "jtan325" <> writes:


    > customize_compiler
    > cc_cmd = cc + ' ' + opt
    > TypeError: cannot concatenate 'str' and 'NoneType' objects


    [...]

    > upon closer inspection of Python's distutils sysconfig.py, is the error
    > being caused by the ' ' in "cc_cmd = cc + ' ' + opt"? Any ideas on this
    > new error? Are there packages/settings I need to take care of before i
    > can use Python's distutils to install stuff?


    The error message indicates that one of the operands on the right side is
    None. ' ' is clearly a string constant (string with one whitespace), so the
    problem must be either cc or opt - one of them is None.

    Toying a little I realized Python emits different warnings for pairs
    cc, opt = None, 'cat' and
    cc, opt = 'cat', None:

    >>> cc, opt = None, 'cat'
    >>> cc_cmd = cc + ' ' + opt

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

    # note the different TypeError message below

    >>> cc, opt = 'cat', None
    >>> cc_cmd = cc + ' ' + opt

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    TypeError: cannot concatenate 'str' and 'NoneType' objects

    So, for some reason, variable opt is None.

    --
    # Edvard Majakari Software Engineer
    # PGP PUBLIC KEY available Soli Deo Gloria!

    $_ = '456476617264204d616a616b6172692c20612043687269737469616e20'; print
    join('',map{chr hex}(split/(\w{2})/)),uc substr(crypt(60281449,'es'),2,4),"\n";
    Edvard Majakari, Jun 30, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Siegfried Heintze
    Replies:
    0
    Views:
    2,271
    Siegfried Heintze
    Oct 24, 2005
  2. leeanne
    Replies:
    0
    Views:
    1,861
    leeanne
    Sep 24, 2008
  3. Omita
    Replies:
    2
    Views:
    336
    Piet van Oostrum
    Apr 30, 2009
  4. donet programmer
    Replies:
    3
    Views:
    1,536
    Gregory A. Beamer
    Nov 20, 2009
  5. Intransition

    Install Settings after Paperclipped

    Intransition, Jan 27, 2011, in forum: Ruby
    Replies:
    1
    Views:
    74
    Intransition
    Jan 27, 2011
Loading...

Share This Page