當(dāng)我們通過“pip install xxx”安裝一些包含C++代碼的包時(shí),通常會(huì)發(fā)生安裝失敗并報(bào)錯(cuò)“ error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools”: https://visualstudio.microsoft.com/visual-cpp-build-tools/” 的情況,這里給出兩種解決方法:
Method 1:直接通過鏈接 “https://visualstudio.microsoft.com/visual-cpp-build-tools/” 安裝 Visual Studio 。優(yōu)點(diǎn)是簡單粗暴,但是缺點(diǎn)是需要時(shí)間較長,并且需要占用較大的內(nèi)存。
Method 2:
1、通過鏈接“https://my.visualstudio.com/Downloads/Featured?mkt=zh-cn”進(jìn)入微軟插件下載官網(wǎng)(需要先隨便用個(gè)郵箱注冊(cè)一個(gè)微軟賬號(hào))
2、“下載” → “Visual Studio 2015 update 3” → 選擇“Visual C++ Build Tools for Visual Studio 2015 with Update 3” 并勾選“DVD”格式 → “Download”
3、下載后會(huì)獲得".iso"文件,解壓后進(jìn)入文件夾,雙擊".exe"文件進(jìn)行安裝(一路默認(rèn)即可)文章來源:http://www.zghlxwxcb.cn/news/detail-513487.html
完成上述的 Method1 或者 Method2后,再次嘗試"pip install xxx"即可成功安裝。文章來源地址http://www.zghlxwxcb.cn/news/detail-513487.html
到了這里,關(guān)于python install錯(cuò)誤:error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!