Installing MindSpore CPU by Conda-Windows
Conda is an open-source, cross-platform, language-agnostic package manager and environment management system. It allows users to easily install different versions of binary software packages and any required libraries appropriate for their computing platform.
The following describes how to quickly install MindSpore by Conda on Windows in the CPU environment.
For details about how to install third-party dependency software when confirming the system environment information, see the third-party dependency software installation section in the Installing MindSpore Using Source Code Build on Windows (CPU) provided by the community. Thanks to the community member lvmingfu for sharing.
System Environment Information Confirmation
Creating and Accessing the Conda Virtual Environment
Create a Conda virtual environment based on the Python version you want to use and go to the virtual environment.
If you want to use Python 3.7.5:
conda create -c conda-forge -n mindspore_py37 -c conda-forge python=3.7.5
activate mindspore_py37
If you want to use Python 3.8.0:
conda create -c conda-forge -n mindspore_py37 -c conda-forge python=3.8.0
activate mindspore_py38
If you want to use Python 3.9.0:
conda create -c conda-forge -n mindspore_py39 -c conda-forge python=3.9.0
activate mindspore_py39
Installing MindSpore
Ensure that you are in the Conda virtual environment and run the following command to install the latest MindSpore. To install other versions, please refer to the specified version number of Version List after mindspore-cpu=
.
conda install mindspore-cpu -c mindspore -c conda-forge
When the network is connected, dependency items are automatically downloaded during .whl package installation. (For details about the dependency, see required_package in setup.py .) In other cases, you need to install it by yourself. When running models, you need to install additional dependencies based on requirements.txt specified for different models in ModelZoo. For details about common dependencies, see requirements.txt.
Installation Verification
python -c "import mindspore;mindspore.run_check()"
The outputs should be the same as:
MindSpore version: __version__
The result of multiplication calculation is correct, MindSpore has been installed successfully!
It means MindSpore has been installed successfully.
Version Update
Use the following command if you need to update the MindSpore version:
conda update mindspore-cpu -c mindspore -c conda-forge