Python 3.x 以管理员身份在google cloud shell上安装python模块

Python 3.x 以管理员身份在google cloud shell上安装python模块,python-3.x,google-cloud-platform,pip,google-cloud-shell,Python 3.x,Google Cloud Platform,Pip,Google Cloud Shell,我正在尝试使用requirements.txt文件在google cloud shell中安装此模块: 但是,安装失败,出现以下错误: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.7/site-packages/pycparser' Consider using the `--user` option or check th

我正在尝试使用requirements.txt文件在google cloud shell中安装此模块:

但是,安装失败,出现以下错误:

Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.7/site-packages/pycparser'
Consider using the `--user` option or check the permissions.
模块存在一个已知错误,需要以管理员用户身份在python3.7上安装pip:


我的问题是,如何在google cloud shell上pip安装这个具有管理员权限的模块?非常感谢你的帮助

假设您在基于Linux的shell上

只需使用
sudopip安装


这将以管理员权限运行
pip

我不确定谷歌云是如何工作的,但是你不能
sudo-pip安装吗?谢谢!不客气!我只是把它贴出来作为帮助未来谷歌人的答案:P