gpt4 book ai didi

python - 无法在 Mac 上安装 pip2.7

转载 作者:太空宇宙 更新时间:2023-11-03 16:30:15 27 4
gpt4 key购买 nike

我正在尝试在 Python 2.7 上安装“mrjob”包。但是,当我运行“pip2.7 install mrjob”时,出现以下错误。有人有解决这个问题的办法吗?注意:我的 Mac 上同时安装了 Python 2.7 和 3.5。

Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 742, in install
**kwargs
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 831, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 1032, in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip/wheel.py", line 346, in move_wheel_files
clobber(source, lib_dir, True)
File "/Library/Python/2.7/site-packages/pip/wheel.py", line 317, in clobber
ensure_dir(destdir)
File "/Library/Python/2.7/site-packages/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/boto'

最佳答案

以提升的权限运行它。

sudo pip2.7 安装 mrjob

关于python - 无法在 Mac 上安装 pip2.7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37666137/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com