簡體   English   中英

以管理員身份在谷歌雲 shell 上安裝 python 模塊

[英]Install python module on google cloud shell as admin

我正在嘗試使用 requirements.txt 文件在谷歌雲 shell 中安裝此模塊: https://pypi.org/project/kiteconnect/

但是,安裝失敗並出現以下錯誤:

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: https://kite.trade/forum/discussion/5131/kiteconnect-installation-issue-for-python-3-7

我的問題是,我如何 pip 在谷歌雲 shell 上安裝這個具有管理員權限的模塊? 非常感謝您的幫助!

假設您使用的是基於 Linux 的 shell...

只需使用sudo pip install

這將以管理員權限運行pip

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM