Failing `import numpy.distutils.core` with python-numpy package installed

Bug #956901 reported by Logi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-numpy (Ubuntu)
Fix Released
Undecided
Julian Taylor

Bug Description

In the source folder for http://code.google.com/p/netcdf4-python/ running `python setup.py install` as described in the README file fails with:

  logi@magni:~/python-lib/netCDF4-0.9.9$ python setup.py install
  Traceback (most recent call last):
    File "setup.py", line 2, in <module>
      from numpy.distutils.core import setup, Extension
    File "/usr/lib/python2.7/dist-packages/numpy/distutils/core.py", line 25, in <module>
      from numpy.distutils.command import config, config_compiler, \
    File "/usr/lib/python2.7/dist-packages/numpy/distutils/command/build_ext.py", line 16, in <module>
      from numpy.distutils.system_info import combine_paths
    File "/usr/lib/python2.7/dist-packages/numpy/distutils/system_info.py", line 205, in <module>
      p = sp.Popen(["dpkg-architecture", "-qDEB_HOST_MULTIARCH"], stdout=sp.PIPE)
    File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
      errread, errwrite)
    File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
      raise child_exception
  OSError: [Errno 2] No such file or directory

This has worked on Ubuntu 11.10, an earlier iteration of 12.04 (although the exact package version number is lost in the mists of time) and a Debian testing.

Running the same line interactively, either identically as `from numpy.distutils.core import setup, Extension` or as `import numpy.distutils.core` fails in the same way.

To verify:
  logi@magni:~/python-lib/netCDF4-0.9.9$ file /usr/lib/python2.7/dist-packages/numpy/core/__init__.py
  /usr/lib/python2.7/dist-packages/numpy/core/__init__.py: symbolic link to `../../../../../share/pyshared/numpy/core/__init__.py'
  logi@magni:~/python-lib/netCDF4-0.9.9$ file /usr/lib/python2.7/dist-packages/numpy/core/../../../../../share/pyshared/numpy/core/__init__.py
  /usr/lib/python2.7/dist-packages/numpy/core/../../../../../share/pyshared/numpy/core/__init__.py: Python script, ASCII text executable

  logi@magni:~/python-lib/netCDF4-0.9.9$ python
  Python 2.7.3rc1 (default, Mar 10 2012, 08:44:28)
  [GCC 4.6.3] on linux2

  logi@magni:~/python-lib/netCDF4-0.9.9$ dpkg --list *numpy*
  [headers]
  ii python-numpy 1:1.6.1-5ubuntu1 Numerical Python adds a fast array facility to the Python language
  [uninstalled packages]

Related branches

Revision history for this message
Logi (logi) wrote :

Installing python-numpy_1.6.1-5_amd64.deb from Debian experimental gets me past this hurdle and then we'll see if it breaks everything down the line.

Logi (logi)
Changed in python-numpy (Ubuntu):
status: New → Incomplete
status: Incomplete → New
Revision history for this message
Julian Taylor (jtaylor) wrote :

you need to install dpkg-dev for it to work.
I'll change it to use gcc -print-multiarch instead and add a recommend + better error message

Changed in python-numpy (Ubuntu):
assignee: nobody → Julian Taylor (jtaylor)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-numpy - 1:1.6.1-5ubuntu2

---------------
python-numpy (1:1.6.1-5ubuntu2) precise; urgency=low

  * update search-multiarch-paths.patch (LP: #956901)
    use gcc -print-multiarch to detect the path and recommend gcc
 -- Julian Taylor <email address hidden> Mon, 19 Mar 2012 07:50:30 +0100

Changed in python-numpy (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.