sqlalchemy报错AttributeError: can't...
Flask中使用sqlalchemy报错: AttributeError: can't set attribute 原因是sqlalchemy版本太新了,安装老版本: pip install -v sqlalchemy==1.3.23
解决AttributeError: module 'sys' has no...
Python 3 系统默认使用的就是utf-8编码, 就不需要sys.setdefaultencoding("utf-8")这段代码, 而且Python 3的sys库里面已经没有setdefaultencoding()函数。
解决AttributeError: module...
报错: AttributeError module 'time' has no attribute 'clock' 解决方法: python3.8不支持 clock 了,用time.perf_counter()替换就可以了。
pip删除所有包
具体命令如下: pip freeze > requirements.txt #导出所有包 pip uninstall -r requirements.txt -y #删除所有包
dpkg清理rc状态的包
dpkg -l 命令可以浏览所有安装的包,其中 rc 状态的包即卸载了包却保留了配置文件。如果想要完整删除所有 rc 状态的包一个一个删还是很麻烦的,所以可以使用以下命令进行清理。 dpkg -l | grep ^rc | cut -d' ' -f3 | sudo xargs dpkg --purge 使用实例 niu@niu:~/download/wordpress$ dpkg -l | grep ^rc | cut -d' ' -f3 | sudo xargs dpkg --purge (Reading database ... 176063 files and directories currently installed.) Removing freeglut3 ... Purging configuration files for freeglut3 ... Removing libphysfs1 ... Purging configuration files for libphysfs1 ... Removing libsdl-pango1 ... Purging configuration files for libsdl-pango1 ... niu@niu:~/download/wordpress$
linux删除编译安装的软件
在linux 中用一下命令安装的软件: ./configure && make && make install 需要删除可以在该目录执行: make uninstall