【问题标题】:How to install google-api-python-client via terminal如何通过终端安装 google-api-python-client
【发布时间】:2016-12-14 20:56:29
【问题描述】:

我正在尝试安装 google-api-python-client 包,使用终端和

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

同样的结果

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

我还发现,有人建议使用这种方法:

sudo chown -R zkid18 /Users/zkid18/Library/Logs/pip
chown: /Users/zkid18/Library/Logs/pip: No such file or directory

sudo chown -R zkid18 /Users/zkid18/Library/Cashes/pip
chown: /Users/zkid18/Library/Cashes/pip: No such file or directory

当我通过 Pycharm 安装时,结果相同 我的例外

例外: 回溯(最近一次通话最后): 文件“/Library/Python/2.7/site-packages/pip/basecommand.py”,第 215 行,在 main 状态 = self.run(选项,参数) 运行中的文件“/Library/Python/2.7/site-packages/pip/commands/install.py”,第 317 行 前缀=options.prefix_path, 安装中的文件“/Library/Python/2.7/site-packages/pip/req/req_set.py”,第 736 行 要求.卸载(auto_confirm=True) 卸载中的文件“/Library/Python/2.7/site-packages/pip/req/req_install.py”,第 742 行 path_to_remove.remove(auto_confirm) 文件“/Library/Python/2.7/site-packages/pip/req/req_uninstall.py”,第 115 行,删除 重命名(路径,新路径) 重命名文件“/Library/Python/2.7/site-packages/pip/utils/init.py”,第 267 行 shutil.move(旧的,新的) 文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”,第 302 行,在移动 copy2(src, real_dst) 文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”,第 131 行,在 copy2 复制统计(src,dst) 文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”,第 103 行,在 copystat os.chflags(dst, st.st_flags) OSError:[Errno 1] 不允许操作:'/tmp/pip-uxDRkx-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7。鸡蛋信息'

【问题讨论】:

    标签: python google-api


    【解决方案1】:

    使用 virtualenv 安装

    virtualenv temp
    source temp/bin/activate
    pip install --upgrade google-api-python-client
    

    或忽略六

    sudo pip install --upgrade google-api-python-client --ignore-installed six
    

    【讨论】:

      猜你喜欢
      • 2017-08-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-14
      • 2021-10-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多