python中遇到的問題總結
阿新 • • 發佈:2018-11-29
1、 pip升級後出現提示資訊
DEPRECATION: The default format will switch to columns in the future. You can use –format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
這段資訊的意思是說以後pip list的預設格式會採用columns了
解決方法:(windows)在C:\Users{使用者名稱}\ 目錄下建立名稱為pip的資料夾,裡面建立文字檔案,內容為
[list]
format=columns
然後儲存檔名為pip.ini就解決了,這時候再重新開啟命令列執行pip list就不會出現提示資訊了
2、使用pip install pandas 時出現錯誤提示
error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”: http://landinghub.visualstudio.com/visual-cpp-build-tools
這是由於某些模組需要依賴vs,開啟上面的url,下載visualcppbuildtools_full.exe然後選擇預設方式安裝就可以了,安裝完成後重新執行pip 安裝命令就ok了。
3、安裝python3時出現錯誤:
zipimport.ZipImportError: can’t decompress data; zlib not available
使用yum 安裝 zlib、zlib-devel就可以了。記得使用yum search去檢視詳細包名。
未完待續。。。。。。