[Numpy-discussion] Installation problem: numpy1.5.1 + python2.7 + virtualenv-1, 5, 1

Ralf Gommers ralf.gommers at googlemail.com
Wed Apr 6 14:08:48 EDT 2011


On Tue, Apr 5, 2011 at 11:17 PM, Vicent Mas <uvemas at gmail.com> wrote:
> Hi,
>
> I'm trying to install numpy1.5.1 in a virtual environment (virtualenv-1.5.1)
> on my debian testing box. I'm using python 2.7 installed from a debian
> package.
>
> This is what I get:
>
> (venv2.7)vmas at rachael$ python setup.py install
> Running from numpy source directory.F2PY Version 1
> blas_opt_info:
> blas_mkl_info:
>  libraries mkl,vml,guide not found in /usr/lib
>  NOT AVAILABLE
>
> atlas_blas_threads_info:
> Setting PTATLAS=ATLAS
> Setting PTATLAS=ATLAS
> Setting PTATLAS=ATLAS
>  FOUND:
>    libraries = ['ptf77blas', 'ptcblas', 'atlas']
>    library_dirs = ['/usr/lib/atlas-base']
>    language = c
>    include_dirs = ['/usr/include/atlas']
>
>  FOUND:
>    libraries = ['ptf77blas', 'ptcblas', 'atlas']
>    library_dirs = ['/usr/lib/atlas-base']
>    language = c
>    define_macros = [('ATLAS_INFO', '"\\"?.?.?\\""')]
>    include_dirs = ['/usr/include/atlas']
>
> lapack_opt_info:
> lapack_mkl_info:
> mkl_info:
>  libraries mkl,vml,guide not found in /usr/lib
>  NOT AVAILABLE
>
>  NOT AVAILABLE
>
> atlas_threads_info:
> Setting PTATLAS=ATLAS
>  libraries lapack not found in /usr/lib/atlas-base
> numpy.distutils.system_info.atlas_threads_info
> Setting PTATLAS=ATLAS
> Setting PTATLAS=ATLAS
>  FOUND:
>    libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas']
>    library_dirs = ['/usr/lib/atlas-base/atlas', '/usr/lib/atlas-base']
>    language = f77
>    include_dirs = ['/usr/include/atlas']
>
>  FOUND:
>    libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas']
>    library_dirs = ['/usr/lib/atlas-base/atlas', '/usr/lib/atlas-base']
>    language = f77
>    define_macros = [('ATLAS_INFO', '"\\"?.?.?\\""')]
>    include_dirs = ['/usr/include/atlas']
>
> running install
> running build
> running config_cc
> unifing config_cc, config, build_clib, build_ext, build commands --compiler
> options
> running config_fc
> unifing config_fc, config, build_clib, build_ext, build commands --fcompiler
> options
> running build_src
> build_src
> building py_modules sources
> creating build
> creating build/src.linux-i686-2.7
> creating build/src.linux-i686-2.7/numpy
> creating build/src.linux-i686-2.7/numpy/distutils
> building library "npymath" sources
> Traceback (most recent call last):
>  File "setup.py", line 211, in <module>
>    setup_package()
>  File "setup.py", line 204, in setup_package
>    configuration=configuration )
>  File
> "/usr/local/src/ViTables_environ/General/numpy-1.5.1/numpy/distutils/core.py",
> line 186, in setup
>    return old_setup(**new_attr)
>  File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
>    dist.run_commands()
>  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
>    self.run_command(cmd)
>  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
>    cmd_obj.run()
>  File
> "/usr/local/src/ViTables_environ/General/numpy-1.5.1/numpy/distutils/command/install.py",
> line 55, in run
>    r = old_install.run(self)
>  File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run
>    self.run_command('build')
>  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
>    self.distribution.run_command(command)
>  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
>    cmd_obj.run()
>  File
> "/usr/local/src/ViTables_environ/General/numpy-1.5.1/numpy/distutils/command/build.py",
> line 37, in run
>    old_build.run(self)
>  File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run
>    self.run_command(cmd_name)
>  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
>    self.distribution.run_command(command)
>  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
>    cmd_obj.run()
>  File
> "/usr/local/src/ViTables_environ/General/numpy-1.5.1/numpy/distutils/command/build_src.py",
> line 152, in run
>    self.build_sources()
>  File
> "/usr/local/src/ViTables_environ/General/numpy-1.5.1/numpy/distutils/command/build_src.py",
> line 163, in build_sources
>    self.build_library_sources(*libname_info)
>  File
> "/usr/local/src/ViTables_environ/General/numpy-1.5.1/numpy/distutils/command/build_src.py",
> line 298, in build_library_sources
>    sources = self.generate_sources(sources, (lib_name, build_info))
>  File
> "/usr/local/src/ViTables_environ/General/numpy-1.5.1/numpy/distutils/command/build_src.py",
> line 385, in generate_sources
>    source = func(extension, build_dir)
>  File "numpy/core/setup.py", line 681, in get_mathlib_info
>    st = config_cmd.try_link('int main(void) { return 0;}')
>  File "/usr/lib/python2.7/distutils/command/config.py", line 248, in try_link
>    self._check_compiler()
>  File
> "/usr/local/src/ViTables_environ/General/numpy-1.5.1/numpy/distutils/command/config.py",
> line 45, in _check_compiler
>    old_config._check_compiler(self)
>  File "/usr/lib/python2.7/distutils/command/config.py", line 103, in
> _check_compiler
>    customize_compiler(self.compiler)
>  File "/usr/lib/python2.7/distutils/ccompiler.py", line 44, in
> customize_compiler
>    cpp = cc + " -E"           # not always
> TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
>
> Doing the same with python2.6 (also from debian package) works just fine. Could
> somebody tell me what am I doing wrong? Thanks.

Looks like there is something going wrong with your virtualenv setup,
if you look at the backtrace it uses the python in /usr/lib/python2.7/
instead of the one in your virtualenv.

Ralf



More information about the NumPy-Discussion mailing list