Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running Ubuntu 14.04. I have scipy 0.13.3 and I would like to upgrade it .

I have tried:

sudo pip3 install scipy --upgrade

but I receive this error:

creating build/lib.linux-x86_64-3.4/scipy/_build_utils

copying scipy/_build_utils/ ->

copying scipy/_build_utils/ ->

running build_clib
customize UnixCCompiler
customize UnixCCompiler using build_clib
building 'dfftpack' library
Running from scipy source directory.

"object of type 'type' has no len()" in evaluating 'len(list)'
(available names: [])

"object of type 'type' has no len()" in evaluating 'len(list)'
(available names: [])

"object of type 'type' has no len()" in evaluating 'len(list)'
(available names: [])

"object of type 'type' has no len()" in evaluating 'len(list)'
(available names: [])

"object of type 'type' has no len()" in evaluating 'len(list)'
(available names: [])

"object of type 'type' has no len()" in evaluating 'len(list)'
(available names: [])

error: library dfftpack has Fortran sources but no Fortran compiler found

Rolling back uninstall of scipy Cleaning up... 
Command /usr/bin/python3 -c "import setuptools, 
tokenize;__file__='/tmp/pip_build_root/scipy/';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), file__,
'exec'))" install --record /tmp/pip-h0l8itnj-record/install-record.txt
--single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/scipy Storing debug log for failure in  /home/donbeo/.pip/pip.log 


How can I solve this? I am working on an almost fresh installation of Ubuntu 14.04.

share|improve this question
up vote 2 down vote accepted

I saw from reading your question: how can I update scipy in winpython on windows? on Stack Overflow that you want to update scipy to version 0.14. There is an easier way of upgrading python3-scipy 0.13.3 to python3-scipy 0.14.0 than using pip3.

  1. Uninstall python3-scipy.

    sudo apt-get remove python3-scipy
  2. Download the python3-scipy package for Ubuntu 14.10.
    Visit, select the version of python3-scipy that matches your operating system's architecture, select a mirror, and download the python3-scipy .deb file.

  3. Install the python3-scipy package for Ubuntu 14.10.
    Double-click on the python3-scipy .deb file that you downloaded to open it in the Ubuntu Software Center, and install it just like you would install any other package. The python3-scipy .deb file for Ubuntu 14.10 has the same dependency package versions as the python3-scipy package from the Ubuntu Software Center, so it should install in Ubuntu 14.04 without any problems.

In Ubuntu 16.04 it is possible to install python3-scipy 0.16.1 from the default Ubuntu repositories.

share|improve this answer
can I install it directly with apt-get? Is there any reason of why I should avoid that? – Donbeo Aug 21 '14 at 0:46
From the terminal change directories to the directory that contains the python3-scipy .deb file and use a command of the form: sudo dpkg -i package-name to install the .deb file. For package-name substitute the name of the .deb file that you downloaded, something that looks like: python3-scipy_0.14.0-1ubuntu1_xxxx.deb where in place of the xxxx would be the architecture. – karel Aug 21 '14 at 0:52

I had this same error on a new 14.04 installation. I fixed it by making sure all scipy dependencies were installed via:

sudo apt-get install python-pip python-dev build-essential libatlas-base-dev gfortran

I believe it was just sudo apt-get install gfortran that was necessary. If you try that first and let us know how it goes, would be helpful.

This was from this thread:

share|improve this answer
For me, just sudo apt-get install gfortran was enough – Leo Azevedo Dec 11 '15 at 19:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.