Python
格式化,何容易
这个作者很懒,什么都没留下…
展开
-
2021-10-13
安装Crypto失败背景解决方法 背景 需要使用AES,所以用到了Crypto库,但是安装失败,网上各种教程,包括将安装库的文件名修改掉,但是都不好使 解决方法 from Cryptodome.Cipher import AES pip install pycryptodomex ...原创 2021-10-13 17:06:10 · 103 阅读 · 0 评论 -
Python2.7设置字体颜色
Python2.7设置字体颜色代码示例运行结果 代码示例 # coding=utf-8 HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' def main(): print (FAIL + "报警的颜色字体?" + ENDC) if原创 2021-05-11 22:53:54 · 260 阅读 · 0 评论 -
python2.7安装MySQL-python错误: Cannot open include file: ‘config-win.h‘: No such file or directory
错误信息 解决方法 去这个地方下载对应版本和系统安装包安装,然后重启就可以了 https://downloads.mysql.com/archives/c-c/原创 2021-03-26 17:58:03 · 155 阅读 · 1 评论 -
Building wheel for sasl (setup.py): finished with status ‘error‘
Building wheel for sasl (setup.py): started Building wheel for sasl (setup.py): finished with status ‘error’ ERROR: Command errored out with exit status 1: 解决方案: **apt-get update && apt-get install libsas12-dev**原创 2021-03-11 11:13:37 · 1772 阅读 · 0 评论 -
DJANGO_SETTINGS_MODULE = ‘web_service.settings‘
用Linux终端运行测试:coverage run manage.py test时报错 django.core.exceptions.ImproperlyConfigured: Requested setting CACHES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before a原创 2021-03-10 16:24:44 · 127 阅读 · 0 评论