[{"data":1,"prerenderedAt":351},["ShallowReactive",2],{"content-query-lB0OlCT8oT":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":10,"date":11,"cover":12,"type":13,"category":14,"body":15,"_type":345,"_id":346,"_source":347,"_file":348,"_stem":349,"_extension":350},"/technology-blogs/en/1497","en",false,"",[9],"MindSpore Hands-on Tutorial","Automatic installation scripts are now available to save your time and effort.","2022-05-05","https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/05/28/992358632da144c393430990911abc05.png","technology-blogs","Basics",{"type":16,"children":17,"toc":343},"root",[18,32,38,43,48,53,62,70,75,85,93,102,109,125,132,141,148,156,161,174,181,189,197,202,214,221,229,236,244,251,259,275,285,304,315,329],{"type":19,"tag":20,"props":21,"children":23},"element","h1",{"id":22},"mindspore-hands-on-tutorial-automatic-installation-of-mindspore",[24,30],{"type":19,"tag":25,"props":26,"children":27},"span",{},[28],{"type":29,"value":9},"text",{"type":29,"value":31}," Automatic Installation of MindSpore",{"type":19,"tag":33,"props":34,"children":35},"p",{},[36],{"type":29,"value":37},"Your MindSpore journey starts with installation. Currently, MindSpore supports multiple hardware platforms (Ascend, GPU CUDA 10.1 and 11.1, and CPU) running different OSs (Linux, Windows, and macOS), and can be installed using pip, Conda, the source code, and other methods.",{"type":19,"tag":33,"props":39,"children":40},{},[41],{"type":29,"value":42},"With the release of MindSpore 1.7, automatic installation scripts are now available for MindSpore in the CPU-Linux, GPU, Ascend environments to save your time and effort.",{"type":19,"tag":33,"props":44,"children":45},{},[46],{"type":29,"value":47},"For a newly installed OS, automatic installation is recommended. If some dependencies, such as Python and GCC, have been installed in the OS, manual installation is recommended.",{"type":19,"tag":33,"props":49,"children":50},{},[51],{"type":29,"value":52},"The following examples describe how to install MindSpore on a CPU platform running Ubuntu 18.04 using different installation methods.",{"type":19,"tag":33,"props":54,"children":55},{},[56],{"type":19,"tag":57,"props":58,"children":59},"strong",{},[60],{"type":29,"value":61},"1. Automatic installation",{"type":19,"tag":33,"props":63,"children":64},{},[65],{"type":19,"tag":57,"props":66,"children":67},{},[68],{"type":29,"value":69},"1.1 Installation Using Conda",{"type":19,"tag":33,"props":71,"children":72},{},[73],{"type":29,"value":74},"Conda is a package and environment manager provided by Anaconda. It allows you to easily install software packages and all libraries required by the computing platform. Conda can be seen as a virtual environment that takes over installation of software packages and third-party libraries.",{"type":19,"tag":76,"props":77,"children":78},"ol",{},[79],{"type":19,"tag":80,"props":81,"children":82},"li",{},[83],{"type":29,"value":84},"Check whether the system version meets the requirement.",{"type":19,"tag":33,"props":86,"children":87},{},[88],{"type":19,"tag":89,"props":90,"children":92},"img",{"alt":7,"src":91},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/05/28/6dd70d890f8043d9ab8b4d6f4385080d.png",[],{"type":19,"tag":76,"props":94,"children":96},{"start":95},2,[97],{"type":19,"tag":80,"props":98,"children":99},{},[100],{"type":29,"value":101},"Download and execute the automatic installation script. The script will install the required dependencies, create a Conda virtual environment, and perform the steps for installing MindSpore.",{"type":19,"tag":33,"props":103,"children":104},{},[105],{"type":19,"tag":89,"props":106,"children":108},{"alt":7,"src":107},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/05/28/7d63e70a7cf24c8ab8453f20817e72b0.png",[],{"type":19,"tag":76,"props":110,"children":112},{"start":111},3,[113],{"type":19,"tag":80,"props":114,"children":115},{},[116,118,123],{"type":29,"value":117},"Open a new terminal window for the environment variables to take effect. Run the command to activate the ",{"type":19,"tag":57,"props":119,"children":120},{},[121],{"type":29,"value":122},"mindspore_pyXX",{"type":29,"value":124}," Conda virtual environment created by the automatic installation script.",{"type":19,"tag":33,"props":126,"children":127},{},[128],{"type":19,"tag":89,"props":129,"children":131},{"alt":7,"src":130},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/05/28/beb55414acca408b9f77dee49c93cb6b.png",[],{"type":19,"tag":76,"props":133,"children":135},{"start":134},4,[136],{"type":19,"tag":80,"props":137,"children":138},{},[139],{"type":29,"value":140},"Run the command in the following figure to check whether the installation is successful. If the version number is displayed, the installation is successful.",{"type":19,"tag":33,"props":142,"children":143},{},[144],{"type":19,"tag":89,"props":145,"children":147},{"alt":7,"src":146},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/05/28/23e6ca6161144c7eb682cba6fcd64a04.png",[],{"type":19,"tag":33,"props":149,"children":150},{},[151],{"type":19,"tag":57,"props":152,"children":153},{},[154],{"type":29,"value":155},"1.2 Installation Using pip",{"type":19,"tag":33,"props":157,"children":158},{},[159],{"type":29,"value":160},"pip is the package manager and installer for Python. It allows you to search for, download, install, and uninstall Python packages. The procedure for installing MindSpore using pip is similar to that using Conda.",{"type":19,"tag":76,"props":162,"children":163},{},[164,169],{"type":19,"tag":80,"props":165,"children":166},{},[167],{"type":29,"value":168},"Ensure that the system version is Ubuntu 18.04.",{"type":19,"tag":80,"props":170,"children":171},{},[172],{"type":29,"value":173},"Download and execute the automatic installation script. Different from Conda, the script installs Python 3 and pip3 using APT and installs MindSpore of the corresponding version using pip.",{"type":19,"tag":33,"props":175,"children":176},{},[177],{"type":19,"tag":89,"props":178,"children":180},{"alt":7,"src":179},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/05/28/cd9874100267461a93ef75d93f3fa0b3.png",[],{"type":19,"tag":76,"props":182,"children":183},{"start":111},[184],{"type":19,"tag":80,"props":185,"children":186},{},[187],{"type":29,"value":188},"Re-open the terminal window for the environment variables to take effect. Then, you can check whether the installation is successful.",{"type":19,"tag":33,"props":190,"children":191},{},[192],{"type":19,"tag":57,"props":193,"children":194},{},[195],{"type":29,"value":196},"1.3 Installation Using Source Code",{"type":19,"tag":33,"props":198,"children":199},{},[200],{"type":29,"value":201},"Installing using source code is the most versatile among the installation methods.",{"type":19,"tag":76,"props":203,"children":204},{},[205,209],{"type":19,"tag":80,"props":206,"children":207},{},[208],{"type":29,"value":168},{"type":19,"tag":80,"props":210,"children":211},{},[212],{"type":29,"value":213},"Download and run the automatic installation script. The dependencies installed here are different from those in the first two methods.",{"type":19,"tag":33,"props":215,"children":216},{},[217],{"type":19,"tag":89,"props":218,"children":220},{"alt":7,"src":219},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/05/28/02305a2279ed4e69b40d62f5ed2938a0.png",[],{"type":19,"tag":76,"props":222,"children":223},{"start":111},[224],{"type":19,"tag":80,"props":225,"children":226},{},[227],{"type":29,"value":228},"Re-open the terminal window for the environment variables to take effect and run the following commands to download source code from the code repository and build MindSpore.",{"type":19,"tag":33,"props":230,"children":231},{},[232],{"type":19,"tag":89,"props":233,"children":235},{"alt":7,"src":234},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/05/28/8d414ff2937e499681c098605a4385fc.png",[],{"type":19,"tag":76,"props":237,"children":238},{"start":134},[239],{"type":19,"tag":80,"props":240,"children":241},{},[242],{"type":29,"value":243},"Run the pip command to install MindSpore. Then, you can verify the installation.",{"type":19,"tag":33,"props":245,"children":246},{},[247],{"type":19,"tag":89,"props":248,"children":250},{"alt":7,"src":249},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/05/28/9166943207b14eb5b9a370355e4496d2.png",[],{"type":19,"tag":33,"props":252,"children":253},{},[254],{"type":19,"tag":57,"props":255,"children":256},{},[257],{"type":29,"value":258},"2 Manual Installation",{"type":19,"tag":33,"props":260,"children":261},{},[262,264,273],{"type":29,"value":263},"If some dependencies, such as Python and GCC, have been installed, you can manually install MindSpore using pip, Conda, the source code, and other methods. The requirements and dependencies vary with platforms and installation methods. See the ",{"type":19,"tag":265,"props":266,"children":270},"a",{"href":267,"rel":268},"https://www.mindspore.cn/install/en",[269],"nofollow",[271],{"type":29,"value":272},"MindSpore Installation Guide",{"type":29,"value":274}," for detailed installation procedures.",{"type":19,"tag":33,"props":276,"children":277},{},[278],{"type":19,"tag":57,"props":279,"children":280},{},[281],{"type":19,"tag":89,"props":282,"children":284},{"alt":7,"src":283},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/05/28/16306d88f63b4a25adf7285def5461fa.png",[],{"type":19,"tag":33,"props":286,"children":287},{},[288],{"type":19,"tag":57,"props":289,"children":290},{},[291,296,298],{"type":19,"tag":57,"props":292,"children":293},{},[294],{"type":29,"value":295},"MindSpore website",{"type":29,"value":297},": ",{"type":19,"tag":265,"props":299,"children":302},{"href":300,"rel":301},"https://www.mindspore.cn/en",[269],[303],{"type":29,"value":300},{"type":19,"tag":33,"props":305,"children":306},{},[307],{"type":19,"tag":57,"props":308,"children":309},{},[310],{"type":19,"tag":57,"props":311,"children":312},{},[313],{"type":29,"value":314},"MindSpore Repositories",{"type":19,"tag":33,"props":316,"children":317},{},[318],{"type":19,"tag":57,"props":319,"children":320},{},[321,323],{"type":29,"value":322},"Gitee: ",{"type":19,"tag":265,"props":324,"children":327},{"href":325,"rel":326},"https://gitee.com/mindspore/mindspore",[269],[328],{"type":29,"value":325},{"type":19,"tag":33,"props":330,"children":331},{},[332],{"type":19,"tag":57,"props":333,"children":334},{},[335,337],{"type":29,"value":336},"GitHub: ",{"type":19,"tag":265,"props":338,"children":341},{"href":339,"rel":340},"https://github.com/mindspore-ai/mindspore",[269],[342],{"type":29,"value":339},{"title":7,"searchDepth":134,"depth":134,"links":344},[],"markdown","content:technology-blogs:en:1497.md","content","technology-blogs/en/1497.md","technology-blogs/en/1497","md",1776506103258]