【发布时间】:2016-07-18 16:17:20
【问题描述】:
我正在尝试下载 pip,但我没有 sudo 访问权限。我收到此错误:
Exception:
Traceback (most recent call last):
File "/var/folders/h3/mg0jxd6x7v9gmrg89kcwxbfcpm025t/T/tmp0PONb0/pip.zip/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/var/folders/h3/mg0jxd6x7v9gmrg89kcwxbfcpm025t/T/tmp0PONb0/pip.zip/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/var/folders/h3/mg0jxd6x7v9gmrg89kcwxbfcpm025t/T/tmp0PONb0/pip.zip/pip/req/req_set.py", line 742, in install
**kwargs
File "/var/folders/h3/mg0jxd6x7v9gmrg89kcwxbfcpm025t/T/tmp0PONb0/pip.zip/pip/req/req_install.py", line 831, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/var/folders/h3/mg0jxd6x7v9gmrg89kcwxbfcpm025t/T/tmp0PONb0/pip.zip/pip/req/req_install.py", line 1032, in move_wheel_files
isolated=self.isolated,
File "/var/folders/h3/mg0jxd6x7v9gmrg89kcwxbfcpm025t/T/tmp0PONb0/pip.zip/pip/wheel.py", line 346, in move_wheel_files
clobber(source, lib_dir, True)
File "/var/folders/h3/mg0jxd6x7v9gmrg89kcwxbfcpm025t/T/tmp0PONb0/pip.zip/pip/wheel.py", line 317, in clobber
ensure_dir(destdir)
File "/var/folders/h3/mg0jxd6x7v9gmrg89kcwxbfcpm025t/T/tmp0PONb0/pip.zip/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip'
我尝试过许多其他解决方案,但它们都需要 sudo、wget、brew 和/或 easy_install 等。有人可以提供我在没有这些的情况下下载 pip 应该采取的步骤吗?
谢谢!
【问题讨论】:
-
也许这会有所帮助..forcecarrier.wordpress.com/2013/07/26/…
-
此解决方案需要 wget
标签: python macos installation pip sudo