获取
为本地机器获取 Python 解释器。此命令可在别名 rye fetch
和 rye toolchain fetch
下使用。
从 Rye 0.31.0 版本开始,工具链始终在没有构建信息的情况下获取。这意味着在存储工具链的文件夹中,只会找到解释器。有关更多信息,请参阅 获取工具链。
示例
获取特定版本的 Python
$ rye fetch 3.8.13
Downloading [email protected]
Checking checksum
Unpacking
Downloaded [email protected]
要获取已固定版本的 Python,您可以省略参数
$ rye fetch
Downloading [email protected]
Checking checksum
Unpacking
Downloaded [email protected]
要将 Python 版本获取到特定位置而不是 Rye 的解释器缓存中
$ rye fetch [email protected] --target-path=my-interpreter
参数
-
[版本]
: 要获取的 Python 版本。如果没有提供版本,将获取请求的版本。
选项
-
-f, --force
: 即使已安装,也要获取 Python 工具链。 -
--target-path
<TARGET_PATH>
: 将 Python 工具链获取到明确的位置而不是 -
--build-info
: 获取带构建信息 -
--no-build-info
: 获取不带构建信息 -
-v, --verbose
: 启用详细诊断信息 -
-q, --quiet
: 关闭所有输出 -
-h, --help
: 打印帮助信息(使用 '-h' 查看摘要)