解决libxml/xmlversion.h: No such file...
报错如下:
/tmp/pip-build-imUeln/lxml/src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
#include "libxml/xmlversion.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
解决:
export...
解决libxslt/xsltconfig.h: No such file...
pip 安装 lxml报错如下:
libxslt/xsltconfig.h: No such file or directory
centos解决办法:
sudo yum install libxslt-devel
ubuntu解决办法:
sudo apt install libxslt-dev
然后还需要做如下操作:
sudo ln -s /usr/include/libxml2/libxml /usr/include/libxml
问题解决。
linux开机直接进入命令行模式
vim /etc/inittab
默认内容为:
id:5:initdefault:
改为:
id:3:initdefault:
修改了配置文件系统启动直接进入命令行,这时用Ctrl+Alt+F7不会进入图形界面,需要使用startx命令进入图形界面。
绍一下init命令启动级别的含义(0-6):
0:停机
1:单用户形式,只root进行维护
2:多用户,不能使用net file system
3:完全多用户,即多用户模式的命令行界面
4:未使用(系统之间可能略有不同,有些人的博客写的是安全模式,我本地是未使用)
5:图形化
6:重启
关机命令:init 0 或者...
ImportError: No module named click
安装click:
pip install click
依然提示:
ImportError: No module named click
于是去查看了下e:\anaconda3\lib\site-packages,发现里边并没有click文件,于是搜索到click文件,将这个文件夹放到e:\anaconda3\lib\site-packages下,再执行启动,竟然可以了。
python11报错cannot import name...
部署项目的时候报错:
ImportError: cannot import name ‘Mapping‘ from ‘collections‘
修复的方法也很简单:
将如下代码:
from collections import Mapping
from collections import MutableMapping
修改为:
from collections.abc import Mapping
from collections.abc import MutableMapping
重启项目,问题解决。
类似报错还有:
ImportError: cannot import...
pip找不到ibpq-fe.h头文件的解决方案
控制台错误信息
libpq-fe.h: No such file or directory
解决方法很简单,安装postgresql-devel:
yum install postgresql-devel
问题解决。