【问题标题】:Installation of python google api in Ubuntu在Ubuntu中安装python google api
【发布时间】:2016-11-06 12:36:35
【问题描述】:

以下命令用于在 Linux 的 python 中安装 Google-API。

  pip install --upgrade google-api-python-client

以上命令显示以下错误

文件“/usr/lib/python2.7/dist-packages/pip/basecommand.py”,第 122 行,在 main

status = self.run(options, args)

文件“/usr/lib/python2.7/dist-packages/pip/commands/install.py”,第 283 行,运行中

requirement_set.install(install_options, global_options, root=options.root_path

【问题讨论】:

    标签: python google-api ubuntu-14.04


    【解决方案1】:

    永远记住,如果你尝试在 python 中安装没有虚拟环境的包,会有很多错误和差异。

    我希望您按照链接中的说明创建一个虚拟环境,然后尝试一下。

    http://docs.python-guide.org/en/latest/dev/virtualenvs/

    【讨论】:

      【解决方案2】:
      1) sudo -E pip install --upgrade pip
      
      2) sudo -E pip install --upgrade google-api-python-client
      

      比使用标志-E的环境变量更好

      【讨论】:

      • -E 在使用代理环境时使用。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-21
      • 2017-03-23
      • 2012-08-05
      • 1970-01-01
      • 2013-01-30
      • 1970-01-01
      相关资源
      最近更新 更多