MindSpore Installation Tutorial


1. What is MindSpore

Description: (very useful)

MindSpore: A new generation of AI open source computing framework. 

The innovative programming paradigm makes it easier for AI scientists and engineers to use, and facilitates open innovation; the computing framework can meet the needs of terminal, edge computing, and cloud scenarios, and can better protect data privacy; it can be open sourced to form a broad application ecosystem.

March 28, 2020 Huawei Announced at Developer Conference 2020, full scene AI The computing framework MindSpore is officially open sourced in Code Cloud.

MindSpore focuses on improving ease of use and lowering the development threshold for AI developers. MindSpore natively adapts to each scenario including terminal, edge and cloud, and can realize AI algorithms as code on the basis of on-demand collaboration, making development a state of affairs. More friendly, significantly reducing model development time and lowering the threshold for model development. Through MindSpore's own technological innovation and the synergistic optimization of MindSpore and Huawei's Ascend AI processor, the efficiency of the running state is realized, which greatly improves the computing performance; MindSpore also supports GPU, CPU and other processors. 

Architecture diagram:



2.MindSpore installation tutorial


This article describes how to use pip to quickly install MindSpore on a Windows system in a CPU environment.

(1) Confirm the system environment information

  • Make sure to install Windows 10 as an x86 architecture 64-bit operating system.
  • Make sure to install any version of Python between 3.7-3.9. If it is not installed or another version of Python is installed, it can be downloaded from Python official website or HUAWEI CLOUD Select the appropriate version to install.
  • After installing Python, add Python and pip to the system environment variables.

View python environment

(2) Go to the official website to view the installation information according to the selected environment

Official website address: Mindspore official websitehttps://www.mindspore.cn/install

a. Select your corresponding environment on the official website, as follows

b. Select different commands according to the version

# Python3.7
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/%MS_VERSION%/MindSpore/cpu/x86_64/mindspore-%MS_VERSION:-=%-cp37-cp37m-win_amd64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple
# Python3.8
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/%MS_VERSION%/MindSpore/cpu/x86_64/mindspore-%MS_VERSION:-=%-cp38-cp38-win_amd64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple
# Python3.9
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/%MS_VERSION%/MindSpore/cpu/x86_64/mindspore-%MS_VERSION:-=%-cp39-cp39-win_amd64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple

I am Python3.7. Note: Must be connected to the Internet.

pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/%MS_VERSION%/MindSpore/cpu/x86_64/mindspore-%MS_VERSION:-=%-cp37-cp37m-win_amd64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple

c. Verify success

python -c "import mindspore;mindspore.run_check()"

If successful, it will display

MindSpore version: version number
The result of multiplication calculation is correct, MindSpore has been installed successfully!

3. Upgrade version

If you want to upgrade the version, you can execute the following command (version is replaced with the version number you want to upgrade)

pip install --upgrade mindspore=={version}

Tags: AI

Posted by xxxzom_biexxx on Sat, 01 Oct 2022 04:32:56 +0300