2016-07-23 65 views
0

我跟着the installation guide,但最终安装步骤失败。 我安装Python版本: 蟒蛇2.7.10(默认情况下,2015年10月23日,19点19分21秒) [GCC 4.2.1兼容苹果LLVM 7.0.0(铛-700.0.59.5)]对达尔文使用pip在iMac El Capitan上安装tensorflow的问题?

我已经使用以下两个命令来安装tensorflow

** 1。须藤PIP安装--upgrade $ TF_BINARY_URL

  • 须藤-H PIP安装--upgrade $ TF_BINARY_UR **
  • 不知怎的,我发现的Protobuf不是按照我的Python 2.7安装, 所以我随后从安装地点的建议,

  • PIP安装的protobuf
  • 它安装失败的protobuf,看到错误MES下面的圣人。

    请帮

    预先感谢

    在使用的第一个命令,得到了以下信息:

    目录 '/用户/大卫/图书馆/缓存/ PIP/HTTP'或者其父目录不属于当前用户,并且缓存已被禁用。请检查该目录的权限和所有者。如果用sudo执行pip,你可能需要sudo的-H标志。 目录'/ Users/David/Library/Caches/pip'或其父目录不属于当前用户,并且缓存轮已被禁用。检查该目录的权限和所有者。如果用sudo执行pip,你可能需要sudo的-H标志。

    随后的建议,我用了第二个命令,那么错误信息是:

    例外: 回溯(最近通话最后一个): 文件“/Library/Python/2.7/site-packages/ pip-8.1.2-py2.7.egg/pip/basecommand.py“,行215,主 status = self.run(options,args) 文件”/Library/Python/2.7/site-packages/pip -8.1.2-py2.7.egg/pip/commands/install.py“,行317,运行 prefix = options.prefix_path, File”/Library/Python/2.7/site-packages/pip-8.1。 2-py2.7.egg/pip/req/req_set.py“,第736行,安装中 requirements.uninstall(auto_confirm = True) 文件“/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py”,行742,卸载时 paths_to_remove.remove(auto_confirm) 文件“/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_uninstall.py”,行115,在删除 重命名(路径,new_path) 文件“/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/utils/ init .py”,第267行,重命名为 shutil.move(旧的,新的) 文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”,第299行,移动 copytree(src,real_dst,symlinks = True) 文件“/System/Library/Frameworks/Python.framew扫/版本/ 2.7/lib中/ python2。7/shutil.py“,第208行,副本集 raise错误,错误 错误:[('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/ init。 py','/tmp/pip-9CKE1y-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/ init .py',“[Errno 1] Operation not permitted :'/tmp/pip-9CKE1y-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/ init .py'“),('/ System/Library/Frameworks /Python.framework/Versions/2.7/Extras/lib/python/_markerlib/ init .pyc','/tmp/pip-9CKE1y-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/ lib/python/_markerlib/init .pyc',“[Errno 1] Operation not permitted:'/tmp/pip-9CKE1y-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/ init .pyc'“),('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py','/ tmp/pip-9CKE1y-uninstall/System/Library /Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py',“[Errno 1] Operation not permitted:'/ tmp/pip-9CKE1y-uninstall/System/Library/Frameworks/Python .framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py'“),('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc ','/tmp/pip-9CKE1y-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc',“[Errno 1] Operation not permitted:'/ TMP/PIP-9CKE1y-卸载/系统/资源库/框架/ Python.framework /版本/ 2.7/Extras/lib/python/_markerlib/markers.pyc'“),('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib','/ tmp/pip-9CKE1y-uninstall /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib',“[Errno 1] Operation not permitted:'/ tmp/pip-9CKE1y-uninstall/System/Library/Frameworks/Python .framework /版本/ 2.7 /附加/ LIB /蟒/ _markerlib“')]

    的表彰3,错误消息:

    命令 ”的/ usr /斌/蟒-u -c“导入setuptools,标记化; 文件 = '/私有的/ var /文件夹/ H5/vh7y894j0js3vqkv_hz4qk6w0000gn/T/PIP-积聚KWqDAq/protobuf的/ setup.py'; EXEC(编译(GETATTR(标记化, '开放式',打开)(文件) .read()。replace('\ r \ n','\ n'),file,'exec'))“install --record/var/folders/h5/vh7y894j0js3vqkv_hz4qk6w0000gn/T/pip-5RoEnu-record /install-record.txt --single-version-external-managed -compile“failed with error code 1 in/private/var/folders/h5/vh7y894j0js3vqkv_hz4qk6w0000gn/T/pip-build-KWqDAq/protobuf/

    回答

    0

    我认为这是El Capitan的System Integrity Protection的结果。我可以使用安装以下:

    # Note the lack of "sudo" and the addition of "--user" 
    pip install --user --upgrade $TF_BINARY_URL 
    # And then to ensure that the user-specific packages are used, 
    # I had to start python from the user-site packages directory 
    cd $(python -m site --user-site) 
    
    0

    我安装awsebcli时,也有类似的问题

    尝试:

    sudo pip install protobuf --ignore-installed six