2015-11-24 83 views
2

打字在终端错误在Mac上安装mrjob(OS X 10.11.1)

pip install mrjob

提供了错误信息: “NameError:名称 '的execfile' 没有定义” 和 “命令” 蟒蛇setup.py egg_info “在/私人失败,错误代码1 ...”

使用

sudo pip install mrjob

也给出了同样的错误消息。此外,它给出了以下消息:

Password: The directory '/Users/.../Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/Users/.../Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

如何成功安装?

+1

我无法在OsX上复制10.11.1 =( –

回答

1

之间March 2015May 2015年,mrjobsetup.py使用Python的2只内置函数execfile,将其从Python 3 built-in functions除去。

您遇到的NameError强烈暗示该问题是由于使用Python 3解释器导致的。

该项目在2015年9月份募集了similar bug,并且固定的setup.py当时尚未公布。看来,这个错误是固定在v0.5.0,发布3月28日2016年

安装,使用一个版本的标准:

pip install --user "mrjob>=5" 

还可能升级点子可以解决你提到WRT sudo的问题,但似乎就像一个独立问题中最好解决的无关问题。

+0

我相信我在尝试安装之前已将我的Python解释器更新为Python 3,谢谢! –