[{"data":1,"prerenderedAt":628},["ShallowReactive",2],{"content-query-ux3fVmIs0G":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"cover":11,"type":12,"body":13,"_type":622,"_id":623,"_source":624,"_file":625,"_stem":626,"_extension":627},"/technology-blogs/zh/951","zh",false,"","超详细，小白福利！昇思MindSpore的CPU在win10x64下如何安装？","使用pip方式快速安装MindSpore","2022-01-14","https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/01/17/437c0b42c2714cf39d02f6de1bd02fe2.png","technology-blogs",{"type":14,"children":15,"toc":607},"root",[16,24,33,51,56,65,70,75,82,87,130,135,143,150,157,170,179,188,193,203,208,215,220,227,235,243,248,296,304,312,319,324,332,340,345,353,358,367,372,380,384,392,400,409,416,424,448,457,465,473,480,485,492,500,512,531,538,546,554,560,567,570,580,589,598],{"type":17,"tag":18,"props":19,"children":21},"element","h1",{"id":20},"超详细小白福利昇思mindspore的cpu在win10x64下如何安装",[22],{"type":23,"value":8},"text",{"type":17,"tag":25,"props":26,"children":27},"p",{},[28],{"type":17,"tag":29,"props":30,"children":32},"img",{"alt":7,"src":31},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/01/17/3a5f3761faa74fa98a873d6a84fa741e.gif",[],{"type":17,"tag":25,"props":34,"children":35},{},[36,38,44,46],{"type":23,"value":37},"作者：",{"type":17,"tag":39,"props":40,"children":41},"strong",{},[42],{"type":23,"value":43},"irrational",{"type":23,"value":45}," ｜",{"type":17,"tag":39,"props":47,"children":48},{},[49],{"type":23,"value":50},"来源：华为云",{"type":17,"tag":25,"props":52,"children":53},{},[54],{"type":23,"value":55},"本文档介绍如何在CPU环境的Windows系统上，使用pip方式快速安装MindSpore。",{"type":17,"tag":57,"props":58,"children":60},"h3",{"id":59},"算法介绍确认系统环境",[61],{"type":17,"tag":39,"props":62,"children":63},{},[64],{"type":23,"value":59},{"type":17,"tag":25,"props":66,"children":67},{},[68],{"type":23,"value":69},"1、确认安装Windows 10是x86架构64位操作系统。",{"type":17,"tag":25,"props":71,"children":72},{},[73],{"type":23,"value":74},"2、cmd输入winver即可。",{"type":17,"tag":25,"props":76,"children":77},{},[78],{"type":17,"tag":29,"props":79,"children":81},{"alt":7,"src":80},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/01/17/53b7471ee8ef4f45917d90184f411a7a.jpg",[],{"type":17,"tag":25,"props":83,"children":84},{},[85],{"type":23,"value":86},"3、确认安装Python 3.7.5或3.9.0版本。如果未安装或者已安装其他版本的Python，可以选择下载并安装：",{"type":17,"tag":88,"props":89,"children":90},"ul",{},[91,113],{"type":17,"tag":92,"props":93,"children":94},"li",{},[95,97,101],{"type":23,"value":96},"Python 3.7.5版本 64位，下载地址：官网或华为云。",{"type":17,"tag":98,"props":99,"children":100},"br",{},[],{"type":17,"tag":102,"props":103,"children":104},"em",{},[105],{"type":17,"tag":106,"props":107,"children":111},"a",{"href":108,"rel":109},"https://mirrors.huaweicloud.com/python/3.7.5/python-3.7.5-amd64.exe",[110],"nofollow",[112],{"type":23,"value":108},{"type":17,"tag":92,"props":114,"children":115},{},[116,118,121],{"type":23,"value":117},"Python 3.9.0版本 64位，下载地址：官网或华为云。",{"type":17,"tag":98,"props":119,"children":120},{},[],{"type":17,"tag":102,"props":122,"children":123},{},[124],{"type":17,"tag":106,"props":125,"children":128},{"href":126,"rel":127},"https://mirrors.huaweicloud.com/python/3.9.0/python-3.9.0-amd64.exe",[110],[129],{"type":23,"value":126},{"type":17,"tag":25,"props":131,"children":132},{},[133],{"type":23,"value":134},"4、安装Python完毕后，将Python和pip添加到系统环境变量。",{"type":17,"tag":88,"props":136,"children":137},{},[138],{"type":17,"tag":92,"props":139,"children":140},{},[141],{"type":23,"value":142},"添加Python：控制面板->系统->高级系统设置->环境变量。双击系统变量中的Path，将python.exe的路径添加进去。",{"type":17,"tag":25,"props":144,"children":145},{},[146],{"type":17,"tag":29,"props":147,"children":149},{"alt":7,"src":148},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/01/17/b75c0671c12b43d594d4967c207e26df.jpg",[],{"type":17,"tag":25,"props":151,"children":152},{},[153],{"type":17,"tag":29,"props":154,"children":156},{"alt":7,"src":155},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/01/17/4e5742d007b947bd9f85e7c778332c87.jpg",[],{"type":17,"tag":88,"props":158,"children":159},{},[160,165],{"type":17,"tag":92,"props":161,"children":162},{},[163],{"type":23,"value":164},"![[Pasted image 20211225214756.png]]",{"type":17,"tag":92,"props":166,"children":167},{},[168],{"type":23,"value":169},"添加pip：python.exe同一级目录中的Scripts文件夹即为Python自带的pip文件，将其路径添加到系统环境变量中即可。",{"type":17,"tag":57,"props":171,"children":173},{"id":172},"安装mindspore",[174],{"type":17,"tag":39,"props":175,"children":176},{},[177],{"type":23,"value":178},"安装MindSpore",{"type":17,"tag":57,"props":180,"children":182},{"id":181},"旁注sha-256完整性校验",[183],{"type":17,"tag":39,"props":184,"children":185},{},[186],{"type":23,"value":187},"旁注：SHA-256完整性校验",{"type":17,"tag":25,"props":189,"children":190},{},[191],{"type":23,"value":192},"使用Windows 10自带工具 校验MD5 SHA1 SHA256类型文件 适用场景：下载文件的完整性校验等。 cmd调出命令行,输入如下命令",{"type":17,"tag":194,"props":195,"children":197},"pre",{"code":196},"certutil -hashfile  \u003C文件名>  \n",[198],{"type":17,"tag":199,"props":200,"children":201},"code",{"__ignoreMap":7},[202],{"type":23,"value":196},{"type":17,"tag":25,"props":204,"children":205},{},[206],{"type":23,"value":207},"例如，校验文件的 md5值",{"type":17,"tag":25,"props":209,"children":210},{},[211],{"type":17,"tag":29,"props":212,"children":214},{"alt":7,"src":213},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/01/17/f9916908b2874305885a4086985a97e8.jpg",[],{"type":17,"tag":25,"props":216,"children":217},{},[218],{"type":23,"value":219},"校验文件的 SHA256值",{"type":17,"tag":25,"props":221,"children":222},{},[223],{"type":17,"tag":29,"props":224,"children":226},{"alt":7,"src":225},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/01/17/4e569026e7ac4ae78305ac78301b0a55.jpg",[],{"type":17,"tag":57,"props":228,"children":230},{"id":229},"安装",[231],{"type":17,"tag":39,"props":232,"children":233},{},[234],{"type":23,"value":229},{"type":17,"tag":194,"props":236,"children":238},{"code":237},"pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/{version}/MindSpore/cpu/x86_64/mindspore-{version}-{python_version}-win_amd64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple\n",[239],{"type":17,"tag":199,"props":240,"children":241},{"__ignoreMap":7},[242],{"type":23,"value":237},{"type":17,"tag":25,"props":244,"children":245},{},[246],{"type":23,"value":247},"其中：",{"type":17,"tag":88,"props":249,"children":250},{},[251,291],{"type":17,"tag":92,"props":252,"children":253},{},[254,256,261,263,270,273,278,280,289],{"type":23,"value":255},"在联网状态下，安装whl包时会自动下载mindspore安装包的依赖项（依赖项详情参见",{"type":17,"tag":39,"props":257,"children":258},{},[259],{"type":23,"value":260},"setup.py",{"type":23,"value":262},"，_",{"type":17,"tag":106,"props":264,"children":267},{"href":265,"rel":266},"https://gitee.com/mindspore/mindspore/blob/r1.5/setup.py_%E4%B8%AD%E7%9A%84required%5C_package%EF%BC%89%EF%BC%8C%E5%85%B6%E4%BD%99%E6%83%85%E5%86%B5%E9%9C%80%E8%87%AA%E8%A1%8C%E5%AE%89%E8%A3%85%E3%80%82%E8%BF%90%E8%A1%8C%E6%A8%A1%E5%9E%8B%E6%97%B6%EF%BC%8C%E9%9C%80%E8%A6%81%E6%A0%B9%E6%8D%AE**ModelZoo**%EF%BC%8C_https://gitee.com/mindspore/models/tree/r1.5/_%EF%BC%8C%E4%B8%AD%E4%B8%8D%E5%90%8C%E6%A8%A1%E5%9E%8B%E6%8C%87%E5%AE%9A%E7%9A%84requirements.txt%E5%AE%89%E8%A3%85%E9%A2%9D%E5%A4%96%E4%BE%9D%E8%B5%96%EF%BC%8C%E5%B8%B8%E8%A7%81%E4%BE%9D%E8%B5%96%E5%8F%AF%E4%BB%A5%E5%8F%82%E8%80%83",[110],[268],{"type":23,"value":269},"https://gitee.com/mindspore/mindspore/blob/r1.5/setup.py_中的required\\_package），其余情况需自行安装。运行模型时，需要根据**ModelZoo**，_https://gitee.com/mindspore/models/tree/r1.5/_，中不同模型指定的requirements.txt安装额外依赖，常见依赖可以参考",{"type":17,"tag":98,"props":271,"children":272},{},[],{"type":17,"tag":39,"props":274,"children":275},{},[276],{"type":23,"value":277},"requirements.txt",{"type":23,"value":279},"，",{"type":17,"tag":102,"props":281,"children":282},{},[283],{"type":17,"tag":106,"props":284,"children":287},{"href":285,"rel":286},"https://gitee.com/mindspore/mindspore/blob/r1.5/requirements.txt",[110],[288],{"type":23,"value":285},{"type":23,"value":290}," 。",{"type":17,"tag":92,"props":292,"children":293},{},[294],{"type":23,"value":295},"{version} 表示MindSpore版本号，例如安装1.5.0版本MindSpore时， {version} 应写为1.5.0，而安装1.5.0-rc1版本时，第一个 {version} 代表下载路径应写为1.5.0-rc1，第二个{version} 代表版本号应写为1.5.0rc1。例如：",{"type":17,"tag":194,"props":297,"children":299},{"code":298},"pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.5.0/MindSpore/cpu/x86_64/mindspore-1.5.0-cp37-cp37m-win_amd64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple\n",[300],{"type":17,"tag":199,"props":301,"children":302},{"__ignoreMap":7},[303],{"type":23,"value":298},{"type":17,"tag":88,"props":305,"children":306},{},[307],{"type":17,"tag":92,"props":308,"children":309},{},[310],{"type":23,"value":311},"{python_version}表示用户的Python版本，Python版本为3.7.5时， {python_version}应写为cp37-cp37m 。Python版本为3.9.0时，则写为 cp39-cp39 。",{"type":17,"tag":25,"props":313,"children":314},{},[315],{"type":17,"tag":29,"props":316,"children":318},{"alt":7,"src":317},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/01/17/1fe803a7df5d46d793bff46388489a1e.jpg",[],{"type":17,"tag":25,"props":320,"children":321},{},[322],{"type":23,"value":323},"会有一个成功的提示。",{"type":17,"tag":57,"props":325,"children":327},{"id":326},"验证是否成功安装",[328],{"type":17,"tag":39,"props":329,"children":330},{},[331],{"type":23,"value":326},{"type":17,"tag":194,"props":333,"children":335},{"code":334},"python -c \"import mindspore;mindspore.run_check()\"\n",[336],{"type":17,"tag":199,"props":337,"children":338},{"__ignoreMap":7},[339],{"type":23,"value":334},{"type":17,"tag":25,"props":341,"children":342},{},[343],{"type":23,"value":344},"如果输出：",{"type":17,"tag":194,"props":346,"children":348},{"code":347},"MindSpore version: 版本号\n",[349],{"type":17,"tag":199,"props":350,"children":351},{"__ignoreMap":7},[352],{"type":23,"value":347},{"type":17,"tag":25,"props":354,"children":355},{},[356],{"type":23,"value":357},"说明MindSpore安装成功了。",{"type":17,"tag":57,"props":359,"children":361},{"id":360},"升级mindspore版本",[362],{"type":17,"tag":39,"props":363,"children":364},{},[365],{"type":23,"value":366},"升级MindSpore版本",{"type":17,"tag":25,"props":368,"children":369},{},[370],{"type":23,"value":371},"当需要升级MindSpore版本时，可执行如下命令：",{"type":17,"tag":194,"props":373,"children":375},{"code":374},"pip install --upgrade mindspore=={version}\n",[376],{"type":17,"tag":199,"props":377,"children":378},{"__ignoreMap":7},[379],{"type":23,"value":374},{"type":17,"tag":25,"props":381,"children":382},{},[383],{"type":23,"value":247},{"type":17,"tag":88,"props":385,"children":386},{},[387],{"type":17,"tag":92,"props":388,"children":389},{},[390],{"type":23,"value":391},"升级到rc版本时，需要手动指定 {version} 为rc版本号，例如1.5.0rc1；如果升级到正式版本， =={version} 字段可以缺省。",{"type":17,"tag":57,"props":393,"children":395},{"id":394},"常见问题",[396],{"type":17,"tag":39,"props":397,"children":398},{},[399],{"type":23,"value":394},{"type":17,"tag":57,"props":401,"children":403},{"id":402},"_1time-out",[404],{"type":17,"tag":39,"props":405,"children":406},{},[407],{"type":23,"value":408},"1、time out",{"type":17,"tag":25,"props":410,"children":411},{},[412],{"type":17,"tag":29,"props":413,"children":415},{"alt":7,"src":414},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/01/17/a5ff116ed6384ba0ae654465a0652921.jpg",[],{"type":17,"tag":25,"props":417,"children":418},{},[419],{"type":17,"tag":39,"props":420,"children":421},{},[422],{"type":23,"value":423},"解决办法：",{"type":17,"tag":88,"props":425,"children":426},{},[427,432,437],{"type":17,"tag":92,"props":428,"children":429},{},[430],{"type":23,"value":431},"重试",{"type":17,"tag":92,"props":433,"children":434},{},[435],{"type":23,"value":436},"设置代理：",{"type":17,"tag":92,"props":438,"children":439},{},[440],{"type":17,"tag":194,"props":441,"children":443},{"code":442},"pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.5.0/MindSpore/cpu/x86_64/mindspore-1.5.0-cp37-cp37m-win_amd64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i http://pypi.douban.com/simple --trusted-host pypi.douban.com\n",[444],{"type":17,"tag":199,"props":445,"children":446},{"__ignoreMap":7},[447],{"type":23,"value":442},{"type":17,"tag":57,"props":449,"children":451},{"id":450},"_2error-could-not-find-a-version",[452],{"type":17,"tag":39,"props":453,"children":454},{},[455],{"type":23,"value":456},"2、ERROR: Could not find a version",{"type":17,"tag":194,"props":458,"children":460},{"code":459},"ERROR: Could not find a version that satisfies the requirement pyparsing!=3.0.5,>=2.0.2 (from packaging>=20.0->mindspore==1.5.0) (from versions: none)\n",[461],{"type":17,"tag":199,"props":462,"children":463},{"__ignoreMap":7},[464],{"type":23,"value":459},{"type":17,"tag":194,"props":466,"children":468},{"code":467},"ERROR: No matching distribution found for pyparsing!=3.0.5,>=2.0.2 (from packaging>=20.0->mindspore==1.5.0)\n",[469],{"type":17,"tag":199,"props":470,"children":471},{"__ignoreMap":7},[472],{"type":23,"value":467},{"type":17,"tag":25,"props":474,"children":475},{},[476],{"type":17,"tag":39,"props":477,"children":478},{},[479],{"type":23,"value":423},{"type":17,"tag":25,"props":481,"children":482},{},[483],{"type":23,"value":484},"pip install pyparsing==2.0.2",{"type":17,"tag":25,"props":486,"children":487},{},[488],{"type":17,"tag":29,"props":489,"children":491},{"alt":7,"src":490},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/01/17/759187cd02db4adf839d38752e3314ef.jpg",[],{"type":17,"tag":25,"props":493,"children":494},{},[495],{"type":17,"tag":39,"props":496,"children":497},{},[498],{"type":23,"value":499},"投稿通道",{"type":17,"tag":25,"props":501,"children":502},{},[503,505,510],{"type":23,"value":504},"欢迎大家踊跃投稿，有想投稿技术干货、项目经验等分享的同学，可以添加MindSpore官方小助手：小猫子（",{"type":17,"tag":39,"props":506,"children":507},{},[508],{"type":23,"value":509},"mindspore0328",{"type":23,"value":511},"）的微信，告诉猫哥哦！",{"type":17,"tag":25,"props":513,"children":514},{},[515,517,522,524,529],{"type":23,"value":516},"昇思MindSpore官方交流QQ群 : ",{"type":17,"tag":39,"props":518,"children":519},{},[520],{"type":23,"value":521},"486831414",{"type":23,"value":523},"（",{"type":17,"tag":39,"props":525,"children":526},{},[527],{"type":23,"value":528},"群里有很多技术大咖助力答疑！",{"type":23,"value":530},"）",{"type":17,"tag":25,"props":532,"children":533},{},[534],{"type":17,"tag":29,"props":535,"children":537},{"alt":7,"src":536},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/01/17/68c84db34661465caa6bacc431e7a04b.jpg",[],{"type":17,"tag":25,"props":539,"children":540},{},[541],{"type":17,"tag":39,"props":542,"children":543},{},[544],{"type":23,"value":545},"官方QQ群号 : 486831414",{"type":17,"tag":25,"props":547,"children":548},{},[549],{"type":17,"tag":39,"props":550,"children":551},{},[552],{"type":23,"value":553},"微信小助手：mindspore0328",{"type":17,"tag":57,"props":555,"children":557},{"id":556},"扫描下方二维码加入mindspore项目",[558],{"type":23,"value":559},"扫描下方二维码加入MindSpore项目",{"type":17,"tag":25,"props":561,"children":562},{},[563],{"type":17,"tag":29,"props":564,"children":566},{"alt":7,"src":565},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/01/09/984c702452434b10817b9084c6a2cee6.jpg",[],{"type":17,"tag":57,"props":568,"children":569},{"id":7},[],{"type":17,"tag":25,"props":571,"children":572},{},[573],{"type":17,"tag":106,"props":574,"children":577},{"href":575,"rel":576},"http://mp.weixin.qq.com/s?__biz=MzAxMDA1MDM0NQ==&mid=2247541446&idx=1&sn=f397c4aadf6313efe8c16d15cec8db3d&chksm=9b542c80ac23a596935839754dc4690c6c0a20319c1bb23c67bc3bd7b527c8cf6d3c1efcc9a9&scene=21#wechat_redirect",[110],[578],{"type":23,"value":579},"MindSpore官方资料",{"type":17,"tag":25,"props":581,"children":582},{},[583],{"type":17,"tag":106,"props":584,"children":586},{"href":575,"rel":585},[110],[587],{"type":23,"value":588},"GitHub : https://github.com/mindspore-ai/mindspore",{"type":17,"tag":25,"props":590,"children":591},{},[592],{"type":17,"tag":106,"props":593,"children":595},{"href":575,"rel":594},[110],[596],{"type":23,"value":597},"Gitee : https : //gitee.com/mindspore/mindspore",{"type":17,"tag":25,"props":599,"children":600},{},[601],{"type":17,"tag":106,"props":602,"children":604},{"href":575,"rel":603},[110],[605],{"type":23,"value":606},"官方QQ群 : 486831414",{"title":7,"searchDepth":608,"depth":608,"links":609},4,[610,612,613,614,615,616,617,618,619,620,621],{"id":59,"depth":611,"text":59},3,{"id":172,"depth":611,"text":178},{"id":181,"depth":611,"text":187},{"id":229,"depth":611,"text":229},{"id":326,"depth":611,"text":326},{"id":360,"depth":611,"text":366},{"id":394,"depth":611,"text":394},{"id":402,"depth":611,"text":408},{"id":450,"depth":611,"text":456},{"id":556,"depth":611,"text":559},{"id":7,"depth":611,"text":7},"markdown","content:technology-blogs:zh:951.md","content","technology-blogs/zh/951.md","technology-blogs/zh/951","md",1776506142329]