Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to upgrade matplotlib 1.5.0 through pip #5435

Closed
yannis1962 opened this issue Nov 8, 2015 · 14 comments
Closed

Unable to upgrade matplotlib 1.5.0 through pip #5435

yannis1962 opened this issue Nov 8, 2015 · 14 comments

Comments

@yannis1962
Copy link

When I try to upgrade matplotlib via pip I get the following:

Phoebe:pip-review-0.3.7 yannis$ pip install --upgrade matplotlib
Collecting matplotlib
  Using cached matplotlib-1.5.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Requirement already up-to-date: numpy>=1.6 in /usr/local/lib/python2.7/site-packages (from matplotlib)
Requirement already up-to-date: pytz in /usr/local/lib/python2.7/site-packages (from matplotlib)
Requirement already up-to-date: python-dateutil in /usr/local/lib/python2.7/site-packages (from matplotlib)
Requirement already up-to-date: cycler in /usr/local/lib/python2.7/site-packages (from matplotlib)
Requirement already up-to-date: pyparsing!=2.0.0,!=2.0.4,>=1.5.6 in /usr/local/lib/python2.7/site-packages (from matplotlib)
Requirement already up-to-date: six>=1.5 in /usr/local/lib/python2.7/site-packages (from python-dateutil->matplotlib)
Installing collected packages: matplotlib
  Found existing installation: matplotlib 1.4.3
    Uninstalling matplotlib-1.4.3:
      Successfully uninstalled matplotlib-1.4.3
  Rolling back uninstall of matplotlib
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 646, in install
    **kwargs
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 803, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 998, in move_wheel_files
    isolated=self.isolated,
  File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 339, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 317, in clobber
    shutil.copyfile(srcfile, destfile)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/mpl_toolkits/exceltools.py'

I'm running MacOS X 10.11 and I have matplotlib 1.4.3 installed via homebrew (which does not provide 1.5.0 yet).

@jenshnielsen
Copy link
Member

Something is wrong tithe the permissions on your files in /usr/local/lib/python2.7/site-packages that is likely caused by your upgrade to OSX 10.11. You can check the output of brew doctor to see if they are set correctly.

@mdboom
Copy link
Member

mdboom commented Nov 8, 2015

That seems like good advice. FWIW, I couldn't reproduce the problem on Mac 10.10 and the homebrew Python 2.7.

@jenshnielsen
Copy link
Member

Closing since this is not a matplotlib issue

@slhck
Copy link

slhck commented Sep 6, 2016

I have the same issue going from 1.5.1 to 1.5.2 – @yannis1962, have you ever resolved it?

As far as I can see, there is no issue with Homebrew and its permissions.

Collecting matplotlib
  Using cached matplotlib-1.5.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Requirement already up-to-date: pyparsing!=2.0.0,!=2.0.4,!=2.1.2,>=1.5.6 in /usr/local/lib/python2.7/site-packages (from matplotlib)
Requirement already up-to-date: pytz in /usr/local/lib/python2.7/site-packages (from matplotlib)
Requirement already up-to-date: cycler in /usr/local/lib/python2.7/site-packages (from matplotlib)
Requirement already up-to-date: python-dateutil in /usr/local/lib/python2.7/site-packages (from matplotlib)
Requirement already up-to-date: numpy>=1.6 in /usr/local/lib/python2.7/site-packages (from matplotlib)
Requirement already up-to-date: six in /usr/local/Cellar/matplotlib/1.5.1/libexec/lib/python2.7/site-packages (from cycler->matplotlib)
Installing collected packages: matplotlib
  Found existing installation: matplotlib 1.5.1
    Uninstalling matplotlib-1.5.1:
      Successfully uninstalled matplotlib-1.5.1
  Rolling back uninstall of matplotlib
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 742, in install
    **kwargs
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 831, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 1032, in move_wheel_files
    isolated=self.isolated,
  File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 346, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 324, in clobber
    shutil.copyfile(srcfile, destfile)
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/mpl_toolkits/exceltools.py'

The file exists and is executable:

$ ll /usr/local/lib/python2.7/site-packages/mpl_toolkits/exceltools.py
lrwxr-xr-x  1 werner  staff  90 Mar  8 16:41 /usr/local/lib/python2.7/site-packages/mpl_toolkits/exceltools.py -> ../../../../Cellar/matplotlib/1.5.1/lib/python2.7/site-packages/mpl_toolkits/exceltools.py

@jenshnielsen
Copy link
Member

As which user are you trying to install matplotlib?

@slhck
Copy link

slhck commented Sep 6, 2016

As werner – that's me. I also did a chown -R $(whoami) /usr/local just to be sure.

@jenshnielsen
Copy link
Member

I don't know exactly what it wrong but mpl_toolkits is a name space package that is known to be problematic when installing and uninstalling with different tools. In the medium to long term we should get rid of the namespace package. (which is currently needed because basemap etc installs into mpl_toolkits)

I would suggest uninstalling the homebrew python package before you try installing matplotlib from pip. It's almost never a good idea to install with one package manager on top of the install from another.

@slhck
Copy link

slhck commented Sep 6, 2016

I would suggest uninstalling the homebrew python package before you try installing matplotlib from pip. It's almost never a good idea to install with one package manager on top of the install from another.

Thanks for your answer, but I'm not sure what exactly you mean by that.

I only have pip from Homebrew:

which -a pip
/usr/local/bin/pip

And as far as I can tell I've only used this to install packages. What other package manager do you assume I have used? By "uninstalling the homebrew python package", do you mean uninstalling matplotlib or Python from Homebrew entirely?

@jenshnielsen
Copy link
Member

Ok I understod that you were using homebrew python to install matplotlib. That was the original issue that @yannis1962 raised

@jenshnielsen
Copy link
Member

@slhck
Copy link

slhck commented Sep 6, 2016

Gotcha, will ask there instead. Thanks.

@jenshnielsen
Copy link
Member

jenshnielsen commented Sep 6, 2016

Not nessesarily. If you have not installed matplotlib from homebrew-python you should be able to pip install matplotlib

You can check you homebrew python install of matplotlib by doing

brew info matplotlib

@slhck
Copy link

slhck commented Sep 6, 2016

Aaah, now I see. I didn't know Homebrew Python did its own package management.

So brew uninstall matplotlib && pip install -U matplotlib did it.

@jenshnielsen
Copy link
Member

Ok great. I think the idea of homebrew-python is to provide a subset of python packages such as matplotlib, numpy and so on which may be harder to install than pure python packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants