4

I got the following error while trying to install matplotlib using pip under Ubuntu 15.04 (Python 2.7.9).

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 304, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1230, in prepare_files
    req_to_install.run_egg_info()
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 326, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 716, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-hP0laO/matplotlib

To be honest, I have no idea why the call to setup.py failed.

2

I'm using matplotlib and other scipy packages like ipython and numpy In Ubuntu 15.04. I've them installed from the Ubuntu repositories. May be you should install python-matplotlib with apt-get

Have you tried to run: sudo apt-get update; sudo apt-get install python-matplotlib

1
  • That fixed it :-) – Mast Aug 9 '15 at 17:28
0

You want to install setuptools if you haven't already. To do this download ez_setup.py file, navigate to the downloaded folder and execute:

python ez_setup.py

or as mentioned in pypi docs, you can also use the following command that will download the appropriate version and install it for you

wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python
1
  • setuptools was already installed. A re-install (just to be sure) had no effect. – Mast Aug 7 '15 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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