gpt4 book ai didi

gsutil - 通过 pip 安装 Google Cloud SDK : "gsutil requires python 2.7"

转载 作者:行者123 更新时间:2023-12-02 03:05:03 24 4
gpt4 key购买 nike

我正在尝试在我的 Macbook Pro 上安装 Google Cloud SDK。如果我尝试,请遵循 https://cloud.google.com/storage/docs/gsutil_install ,下载并运行 bash 脚本,

curl https://sdk.cloud.google.com | bash

我收到以下错误:

For the latest full release notes, please visit:
https://cloud.google.com/sdk/release_notes

╔════════════════════════════════════════════════════════════╗
╠═ Creating update staging area ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: BigQuery Command Line Tool ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: BigQuery Command Line Tool (Platform Spec... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud SDK Core Libraries (Platform Specific) ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Storage Command Line Tool ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Cloud Storage Command Line Tool (Platform... ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: Default set of gcloud commands ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: gcloud cli dependencies ═╣
ERROR: (gcloud.components.update) The component [gcloud-deps-darwin-x86_64] failed to download.

或者,如果我尝试使用 sudo pip install gsutil 安装它,然后尝试运行它,则会收到以下错误:

Kurts-MacBook-Pro:peek-solutions2 kurtpeek$ gsutil --help
gsutil requires python 2.7.

使用 pyenv 将 Python 版本设置为 2.7 后仍然出现此错误:

Kurts-MacBook-Pro:peek-solutions2 kurtpeek$ pyenv versions
system
* 2.7 (set by PYENV_VERSION environment variable)
3.6.5

如何安装 gsutil 的工作版本?

最佳答案

已关注 https://cloud.google.com/sdk/docs/quickstart-macos ,我下载了 .tar.gz 文件并运行 ./google-cloud-sdk/install.sh,现在它正在运行:

Kurts-MacBook-Pro:~ kurtpeek$ gsutil --help
Usage: gsutil [-D] [-DD] [-h header]... [-m] [-o] [-q] [command [opts...] args...]
Available commands:
acl Get, set, or change bucket and/or object ACLs
cat Concatenate object content to stdout
compose Concatenate a sequence of objects into a new composite object.
config Obtain credentials and create configuration file
cors Get or set a CORS JSON document for one or more buckets
cp Copy files and objects
defacl Get, set, or change default ACL on buckets
defstorageclass Get or set the default storage class on buckets
du Display object size usage
hash Calculate file hashes
help Get help about commands and topics
iam Get, set, or change bucket and/or object IAM permissions.
kms Configure Cloud KMS encryption
label Get, set, or change the label configuration of a bucket.
lifecycle Get or set lifecycle configuration for a bucket
logging Configure or retrieve logging on buckets
ls List providers, buckets, or objects
mb Make buckets
mv Move/rename objects and/or subdirectories
notification Configure object change notification
perfdiag Run performance diagnostic
rb Remove buckets
requesterpays Enable or disable requester pays for one or more buckets
rewrite Rewrite objects
rm Remove objects
rsync Synchronize content of two buckets/directories
setmeta Set metadata on already uploaded objects
signurl Create a signed url
stat Display object status
test Run gsutil unit/integration tests (for developers)
update Update to the latest gsutil release
version Print version info about gsutil
versioning Enable or suspend versioning for one or more buckets
web Set a main page and/or error page for one or more buckets

Additional help topics:
acls Working With Access Control Lists
anon Accessing Public Data Without Credentials
apis Cloud Storage APIs
crc32c CRC32C and Installing crcmod
creds Credential Types Supporting Various Use Cases
dev Contributing Code to gsutil
encoding Filename encoding and interoperability problems
encryption Using Encryption Keys
metadata Working With Object Metadata
naming Object and Bucket Naming
options Top-Level Command-Line Options
prod Scripting Production Transfers
projects Working With Projects
retries Retry Handling Strategy
security Security and Privacy Considerations
subdirs How Subdirectories Work
support Google Cloud Storage Support
throttling Throttling gsutil
versions Object Versioning and Concurrency Control
wildcards Wildcard Names

Use gsutil help <command or topic> for detailed help.

关于gsutil - 通过 pip 安装 Google Cloud SDK : "gsutil requires python 2.7",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51470471/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com