This document describes how to quickly install MindSpore by pip in a Windows system with a 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.
python.exe
.Scripts
folder in the same directory python.exe
is the pip file that comes with Python, and add it to the system environment variable.First, refer to Version List to select the version of MindSpore you want to install, and perform SHA-256 integrity check. Taking version 1.8.1 as an example, execute the following commands.
set MS_VERSION=1.8.1
Then run the following commands to install MindSpore according to Python 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
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.
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.
Use the following command if you need to update the MindSpore version:
pip install --upgrade mindspore=={version}
Of which,
{version}
should be specified manually, e.g. 1.5.0rc1; When updating to a standard release, =={version}
could be removed.此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。