python中遇到的问题总结

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去查看详细包名。
未完待续。。。。。。

猜你喜欢

转载自blog.csdn.net/zhong1113/article/details/53906924
今日推荐