Ubuntu 安装 Python 环境管理工具 Miniconda 3

更新日期: 2023-08-22 阅读次数: 655 字数: 271 分类: Python

救命稻草 Miniconda

不用 Miniconda 不行了,最近测试一个 python 的人工语音合成模块给 Android App 使用,安装依赖之后, 直接把 Rasa 的开发环境搞崩了。。。怎么重装都不行。

再也不敢这样粗放地管理 Python 依赖了,还是老老实实地用上环境隔离吧。

下载

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

链接来自于:

https://docs.conda.io/en/latest/miniconda.html

安装

> bash Miniconda3-latest-Linux-x86_64.sh

用户协议的确认,需要耐心,慢慢点击回车才能看到,输入 yes 即可。

Do you accept the license terms? [yes|no]
[no] >>> yes

Miniconda3 will now be installed into this location:
/home/zhongwei/miniconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/zhongwei/miniconda3] >>>

确认安装成功

需要退出 shell,重新进入:

$ conda --v
conda 23.5.2

禁止 conda base 默认启用

再次进入 shell,会发现默认启用了 conda base 环境,而我并不需要,因为偶尔才用到 python

conda config --set auto_activate_base false

退出

conda deactivate

新建环境

conda create -n my_new_env python=3.10

tags: conda

关于作者 🌱

我是来自山东烟台的一名开发者,有敢兴趣的话题,或者软件开发需求,欢迎加微信 zhongwei 聊聊, 查看更多联系方式