Python:Matplotlib安装问题

时间:2014-07-17 20:26:45

标签: python matplotlib

我有mac OSX 10.7.5并且我正在尝试安装matplotlib,但我一直有问题。

Kristas-MacBook-Pro:lib Krista$ brew install matplotlib
==> Installing matplotlib dependency: numpy
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Downloading https://downloads.sourceforge.net/project/numpy/NumPy/1.8.1/nump
Already downloaded: /Library/Caches/Homebrew/numpy-1.8.1.tar.gz
==> Downloading https://pypi.python.org/packages/source/n/nose/nose-1.3.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/numpy--nose-1.3.1.tar.gz
==> python setup.py install --prefix=/usr/local/Cellar/numpy/1.8.1 --single-vers
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --single-version-externally-managed not recognized

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/homebrew/homebrew-python/issues

我不知道该怎么办?我按照该网站的建议尝试了酿造医生等,但我只是迷路了。有什么帮助吗?


尝试安装分发时出现此错误(当尝试升级setuptools时,我也会得到它)

Kristas-MacBook-Pro:lib Krista$ pip install distribute
Downloading/unpacking distribute
  Downloading distribute-0.7.3.zip (145kB): 145kB downloaded
  Running setup.py (path:/private/var/folders/1z/b3f7sbv11gv2jvy113vy8m180000gn/T/pip_build_Krista/distribute/setup.py) egg_info for package distribute

Downloading/unpacking setuptools>=0.7 (from distribute)
  Downloading setuptools-5.4.1-py2.py3-none-any.whl (528kB): 528kB downloaded
Installing collected packages: setuptools, distribute
  Found existing installation: setuptools 0.6c12dev-r85381
    Uninstalling setuptools:
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1431, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 598, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1836, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/util.py", line 295, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 293, in move
OSError: [Errno 13] Permission denied: '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/easy_install.py'

Storing debug log for failure in /Users/Krista/Library/Logs/pip.log

1 个答案:

答案 0 :(得分:0)

您需要更新setuptoolshttps://pypi.python.org/pypi/setuptools)或安装Distributehttps://pypi.python.org/pypi/distribute/0.7.3