Installing Python
To ensure that the Python version used for compilation meets the Milvus requirements, it is advised to install versions later than Python 3.8.
The Python environment is used to develop, compile, and run programs written with Python. Milvus supports clients in multiple programming languages, including Python, Java, and Go. Installing Python can facilitate the use of or extend the Milvus functionality.
- Download Miniconda3.
- Arm
1wget https://repo.anaconda.com/miniconda/Miniconda3-py312_24.7.1-0-Linux-aarch64.sh --no-check-certificate
- x86
1wget https://repo.anaconda.com/miniconda/Miniconda3-py312_24.7.1-0-Linux-x86_64.sh --no-check-certificate
- Arm
- Install Miniconda3.
- Arm
1sh Miniconda3-py312_24.7.1-0-Linux-aarch64.sh - x86
1sh Miniconda3-py312_24.7.1-0-Linux-x86_64.sh
After the installation starts, press Enter as prompted. If yes/no confirmation is required, enter yes.
- Arm
- Configure the pip image website.
1 2
mkdir ~/.pip echo -e "[global]\nindex-url=https://repo.huaweicloud.com/repository/pypi/simple\n[install]\ntrusted-host=repo.huaweicloud.com\n" >> ~/.pip/pip.conf
If the Huawei repository is invalid, try the Tsinghua or Alibaba repositories.
- Tsinghua University repository:
1 2 3 4
[global] index-url=https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host=pypi.tuna.tsinghua.edu.cn
- Alibaba repository:
1 2 3 4
[global] index-url=https://mirrors.aliyun.com/pypi/simple/ [install] trusted-host = mirrors.aliyun.com
- Tsinghua University repository:
- Make the environment variables take effect.
1source ~/.bashrc
By default, Miniconda automatically activates the virtual environment named base. To disable the automatic activation, run the following command:
1conda config --set auto_activate_base false
- Create a Python virtual environment.
1conda create --name milvus python=3.10.6
- Activate the created virtual environment.
1conda activate milvus
- Check the Python version in the virtual environment.
1python --versionThe installation is successful if the following information is displayed:
1Python 3.10.6