![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python笔记
wei_xin1234567
这个作者很懒,什么都没留下…
展开
-
django2.2报错UnicodeDecodeError
UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0xa6 in position 9737: ill debug.py 第331行改成如下,添加了encoding=‘utf-8’ with Path(CURRENT_DIR, 'templates', 'technical_500.html').open(encoding='utf-8') as fh:原创 2020-06-16 10:57:53 · 159 阅读 · 0 评论 -
fatal error: Python.h: No such file or directory
安装uwsgi报错: fatal error: Python.h: No such file or directory 安装python36-devel yum install -y python36-devel 在重新安装uwsgi原创 2020-06-09 15:13:48 · 170 阅读 · 0 评论 -
yum安装软件出错File usrbinyum line 30
File “/usr/bin/yum”, line 30 except KeyboardInterrupt, e: ^ SyntaxError: invalid syntax 重新将python指向为python2版本。可解决问题 rm /usr/bin/python ln -s /usr/bin/python2 /usr/bin/python原创 2020-06-09 10:06:09 · 240 阅读 · 0 评论 -
Python中的&与and
&是位运算,and是逻辑与 In [1]: a = 1 # 0001 In [2]: b = 2 # 0010 In [3]: a and b # a为真,所以值为b Out[3]: 2 In [4]: a & b # 位运算 Out[4]: 0原创 2020-05-19 15:14:35 · 153 阅读 · 0 评论