当前位置:   article > 正文

[系统|工具] 使用asdf-vm安装python3.6.12_tool_versions['python']

tool_versions['python']

系统环境说明

系统:CentOS 7.9
平台:aarch64
CPUFT2000+

参考文献

asdf document
asdf-plugins

asdf-vm安装

多版本管理命令行工具asdf-vm安装及使用

编译依赖安装

  1. 安装gccopenssl-develsqlite-develbzip2-develreadline-devel
sudo yum install gcc openssl-devel bzip2-devel readline-devel sqlite-devel
  • 1

asdf-vm安装Python

  1. 添加Python插件
asdf plugin-add python 
  • 1
  1. 更改 python源代码下载地址使用国内镜像地址
    编辑~/.asdf/plugins/python/pyenv/plugins/python-build/share/python-build/3.6.12,将文件中的https://www.python.org/ftp/改成https://mirrors.huaweicloud.com/
asdf list all python
vim ~/.asdf/plugins/python/pyenv/plugins/python-build/share/python-build/3.6.12
  • 1
  • 2
  1. 安装Python 3.6.12
asdf install python 3.6.12
  • 1
  1. 设置当前Python版本
asdf global python 3.6.12
  • 1
  1. 卸载Python 3.6.12
asdf uninstall python 3.6.12
  • 1
  1. 删除Python插件
asdf plugin remove python
  • 1

使用

在项目目录下创建.tool-versions文件,在文件中添加以下内容

python3 3.6.12
  • 1

然后在项目目录下执行以下命令查看效果

python3 -V
  • 1

输出如下信息

Python 3.6.12
  • 1

扩展

asdf-plugins中的插件皆可参照此方法安装。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/50119
推荐阅读
相关标签
  

闽ICP备14008679号