
Python
$执剑人$
这个作者很懒,什么都没留下…
展开
-
windows安装fdfs_client-py-master报错 cl.exe failed with exit status 2
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2解决方法: 1. 下载 fdfs_client-py-master.zip2. 解压fdfs_client-py-master.zip后目录...原创 2019-01-08 16:11:58 · 1591 阅读 · 1 评论 -
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools":
下载 visualcppbuildtools_full.exe链接:https://pan.baidu.com/s/1RRLOrgbRgFhHf-Y6kdw5FQ 提取码:zeoe 安装即可原创 2019-01-08 15:53:33 · 404 阅读 · 1 评论 -
fastDFS+nginx文件分布式存储服务器安装过程
〇. 准备下载 依赖包libfastcommon-master.zip和安装包fastdfs-master.zip下载 nginx-1.8.1.tar.gz 和 fastdfs-nginx-module-master.zipubuntu版本为: 18.10一. 安装fastdfs依赖包1. 解压缩libfastcommon-master.zipunzip libfastc...原创 2019-01-04 16:38:16 · 438 阅读 · 0 评论 -
redis保存异常: Background saving error
3001:C 17 Dec 19:20:18.091 # Failed opening the RDB file dump.rdb (in server root dir /var/lib/redis) for saving: Permission denied2748:M 17 Dec 19:20:18.191 # Background saving error# 解决办法: 1...原创 2018-12-17 19:37:41 · 9439 阅读 · 1 评论 -
Ubuntu中python3安装虚拟环境
1.首先安装虚拟环境sudo pip3 install virtualenv2.安装虚拟环境扩展包sudo pip3 install virtualenvwrapper3.修改用户家目录下的配置文件.bashrc例: sudo vim /home/python/.bashrc4..bashrc文件中添加如下内容: export WORKON_HOME=$HOME/.virtu...原创 2018-12-13 17:18:17 · 555 阅读 · 2 评论 -
Ubuntu18.10下Redis安装与配置
一. Redis安装:1. 下载Rediswget http://download.redis.io/releases/redis-3.2.8.tar.gz2. 解压安装文件tar -zxvf redis-3.2.8.tar.gz3. 解压后的文件移动到usr/local目录下sudo mv ./redis-3.2.8 /usr/local/redis/4...原创 2018-12-12 18:03:27 · 763 阅读 · 1 评论 -
python中同步发送邮件的步骤
1. 设置smtp服务器, 开启客户端授权码, 不同的邮箱设置略有不同, 下面是以126邮箱为例2. 项目配置文件中配置信息# 发送邮件配置EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'# smpt服务地址EMAIL_HOST = 'smtp.126.com'EMAIL_PORT = 25# 发送邮...原创 2018-12-12 11:11:19 · 625 阅读 · 0 评论 -
python中itsdangerous加密和解密的用法
1.安装itsdangerouspip install itsdangerous2.加密和解密用法# 导入项目配置文件类(用于获取秘钥, 秘钥的获取可以自定义, 不必须在此类中获取)from django.conf import settings# 导入加解密类from itsdangerous import TimedJSONWebSignatureSerializer a...原创 2018-12-12 10:52:34 · 1418 阅读 · 0 评论 -
pip源地址
默认的pip 的源是 https://pypi.python.org/simple国内知名的几个源豆瓣(douban) https://pypi.douban.com/simple清华大学 https://pypi.tuna.tsinghua.edu.cn/simple阿里云 https://mirrors.aliyun.com/pypi/simple中国科技大学 https://pyp...原创 2018-12-10 16:27:21 · 2392 阅读 · 0 评论 -
PyCharm控制台常用命令
查看安装了哪些包: pip list 或 pip freeze将安装的包写入required.txt文件: pip freeze > required.txt全部安装required.txt中的包: pip install -r required.txt安装模块: pip install 模块名==模块版本; 例:pip install django==1.8.2卸载模块:...原创 2018-11-29 16:53:02 · 3820 阅读 · 0 评论 -
Django: doesn't declare an explicit app_label and isn't in an application in INSTALLED_ APPS
出现异常: RuntimeError: Model class db.base_model.BaseModel doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.解决方案: 在项目setting文件中INSTALLED_APPS添加如下代码即可INSTALL...原创 2018-11-27 17:10:20 · 686 阅读 · 1 评论