<分区>
我是 Mac OS X 的新手。我想为 python 编程设置一个环境。 我正在使用 pip管理第三方包。
我使用 easy_install 安装了 pip。
sudo easy_install pip
我尝试将 pip 从 6.1.0 升级到 6.1.1。但是,我的请求被拒绝了,我收到了以下消息。
$ pip install --upgrade pip
You are using pip version 6.1.0, however version 6.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pip
Using cached pip-6.1.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 6.1.0
Uninstalling pip-6.1.0:
Successfully uninstalled pip-6.1.0
Rolling back uninstall of pip
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip-6.1.0-py2.7.egg/pip/basecommand.py", line 246, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip-6.1.0-py2.7.egg/pip/commands/install.py", line 352, in run
root=options.root_path,
File "/usr/local/lib/python2.7/site-packages/pip-6.1.0-py2.7.egg/pip/req/req_set.py", line 711, in install
**kwargs
File "/usr/local/lib/python2.7/site-packages/pip-6.1.0-py2.7.egg/pip/req/req_install.py", line 806, in install
self.move_wheel_files(self.source_dir, root=root)
File "/usr/local/lib/python2.7/site-packages/pip-6.1.0-py2.7.egg/pip/req/req_install.py", line 1007, in move_wheel_files
isolated=self.isolated,
File "/usr/local/lib/python2.7/site-packages/pip-6.1.0-py2.7.egg/pip/wheel.py", line 347, in move_wheel_files
generated.extend(maker.make(spec))
File "/usr/local/lib/python2.7/site-packages/pip-6.1.0-py2.7.egg/pip/_vendor/distlib/scripts.py", line 323, in make
self._make_script(entry, filenames, options=options)
File "/usr/local/lib/python2.7/site-packages/pip-6.1.0-py2.7.egg/pip/_vendor/distlib/scripts.py", line 227, in _make_script
self._write_script(scriptnames, shebang, script, filenames, ext)
File "/usr/local/lib/python2.7/site-packages/pip-6.1.0-py2.7.egg/pip/_vendor/distlib/scripts.py", line 201, in _write_script
self._fileop.write_binary_file(outname, script_bytes)
File "/usr/local/lib/python2.7/site-packages/pip-6.1.0-py2.7.egg/pip/_vendor/distlib/util.py", line 388, in write_binary_file
with open(path, 'wb') as f:
IOError: [Errno 13] Permission denied: '/usr/local/bin/pip'
看来我没有升级pip的权限。我认为这不是缺少依赖包的问题。我使用的 OS X 系统是 OS X 10.10.3。我正在使用 Python 2.7.9。
谁能帮我解决这个问题?