django运行opsmanage项目报错:

解决:

centos系统,使用pip安装pillow,运行时出现ImportError错误“The _imagingft C module is not installed
具体出错的那行代码是font = ImageFont.truetype(‘Arial.ttf’, 36)

解决过程如下:

先确保代码中导入语句是:

尝试先卸载pillow:

安装系统devel包:

再重新安装pillow:

安装完毕。但运行时仍然报错,试了几次仍然不行。

最后在安装pillow时,加上 –no-cache-dir参数:

再试,成功。

另外, 安装daphne失败:

可以用以下安装:

 

Categories: 未分类

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *