473,407 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

python install settings...

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

Jul 19 '05 #1
1 1995
"jtan325" <mr*********@gmail.com> 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!

$_ = '456476617264204d616a616b6172692c20612043687269737 469616e20'; print
join('',map{chr hex}(split/(\w{2})/)),uc substr(crypt(60281449,'es'),2,4),"\n";
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Franz Steinhäusler | last post by:
Hello, My second question from my last post (PyQt on Python 2.4), I think, is a little got under (i have installed both Python 2.3 and Python 2.4) Is there any possibility under WinXP, to...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
5
by: Marcelo Gosling | last post by:
Hi, everyone. This is on WinXP SP2, with Python 2.4.3 and DJGPP gcc 4.1.0. I'm having trouble including Python.h in a C file. The following C code: #include "Python.h" int main()
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 393 open (+15) / 3315 closed (+17) / 3708 total (+32) Bugs : 908 open (+22) / 5975 closed (+49) / 6883 total (+71) RFE : 223 open...
4
by: jmg3000 | last post by:
What's the customary way to keep your own local Python and package directory? For example, when you're on a server where you don't have root access, and everything must go in your home directory. ...
14
by: TheFlyingDutchman | last post by:
I am trying to install Python 2.5 on Windows XP. It installs into the root directory on C:\ instead of C:\Python25 which it shows by default as what it plans to install to. Selecting D:\Python25 on...
4
by: Alia Khouri | last post by:
Can we open up the discussion here about how to improve setuptools which has become the de facto standard for distributing / installing python software. I've been playing around with ruby's gems...
7
by: W. eWatson | last post by:
I copied the following code from a matplotlib tutorial, and it fails. I'm using python 2.4 on Win XP. It's matplotlib-0.98.3.win32-py2.4exe. It fails in IDLE with a small window showing a runtime...
0
by: eGenix Team: M.-A. Lemburg | last post by:
________________________________________________________________________ ANNOUNCING eGenix.com mx Base Distribution Version 3.1.1 for Python 2.6 Open Source Python extensions providing...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.