![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
表演系小学渣
沉迷键盘,无法自拔
展开
-
python开发阿里大于短信
一、在阿里开发者中心https://dayu.aliyun.com/注册短信相关信息,具体步骤详见:https://mp.csdn.net/postedit/88638980二、python中代码部分具体使用详见https://help.aliyun.com/document_detail/101874.html?spm=a2c4g.11186623.6.627.7c6c166aNQt...原创 2019-03-21 17:19:58 · 231 阅读 · 0 评论 -
linux系统部署jdango项目
1、安装好相关的python版本2、安装python开发包64位安装python-devel.x86_64,32位安装python-devel.i686,这里安装:yum install python-devel.x86_643.安装uwsgipip install uwsgi4.安装django1.8.3版本pip install Django==1.8.3...原创 2019-04-02 18:41:16 · 135 阅读 · 0 评论 -
ModuleNotFoundError: No module named 'django_apscheduler'
执行pip install django-apscheduler原创 2019-04-03 08:52:31 · 4188 阅读 · 0 评论 -
运行django报错:You have unapplied migrations; your app may not work properly until they are applied
报错如下Performing system checks...System check identified no issues (0 silenced).You have unapplied migrations; your app may not work properly until they are applied.Run 'python manage.py migrate'...原创 2019-04-03 08:58:02 · 3494 阅读 · 0 评论 -
linux系统运行django项目
cd指令切换到项目根目录,运行python3 manage.py runserver 0.0.0.0:8000或者(根据创建的快捷方式决定)python manage.py runserver 0.0.0.0:8000原创 2019-04-03 09:00:27 · 531 阅读 · 0 评论 -
ModuleNotFoundError: No module named 'salt'
运行pip install salt原创 2019-04-03 09:01:37 · 1271 阅读 · 0 评论 -
ModuleNotFoundError: No module named 'apscheduler.scheduler'
在最新的apscheduler库中没有对应的库,必须指定版本库pip uninstall apschedulerpip install apscheduler==2.1.2原创 2019-04-03 09:22:26 · 12691 阅读 · 1 评论 -
ModuleNotFoundError: No module named 'schedule'
执行pip install schedule原创 2019-04-03 09:23:50 · 4245 阅读 · 0 评论 -
No module named 'pycurl'
执行pip install pycurl原创 2019-04-03 09:25:22 · 401 阅读 · 0 评论 -
报错:Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-e7zn8p24/pycurl/
此错误是安装pycurl时报的错具体报错:Collecting pycurl Using cached https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz Complete...原创 2019-04-03 17:37:11 · 1930 阅读 · 0 评论 -
ImportError: pycurl: libcurl link-time version (7.29.0) is older than compile-time version (7.43.0)
wget http://curl.haxx.se/download/curl-7.24.0.tar.gz安装curl再用pip install pycurl或者编译源码,安装成功。运行项目正常python manage.py runserver访问页面时又开始报错,在Python程序里import pycurl的时候又报错ImportError: pycurl: libcu...原创 2019-04-03 18:03:10 · 2107 阅读 · 1 评论 -
python中向文本中写入文字与按行读取
# 文件写入且覆盖# file = open(filename, 'w', encoding='utf-8')# 文件写入且不覆盖file = open(filename, 'a', encoding='utf-8')file.write(data2)file.closeimport linecachefile = open(filename, 'r', encoding='...原创 2019-03-27 11:24:41 · 1249 阅读 · 0 评论 -
python中数字与字符串拼接
num = 3print('最后倒数第' + str(num) + '行的数据为空的数据')原创 2019-03-27 11:20:42 · 2125 阅读 · 0 评论 -
python安装aliyuncli报错Command "python setup.py egg_info" failed with error code 1 in C:\Users\***
1、更新setuptools软件包:pip install setuptools --upgrade2、重新安装aliyuncli:pip install aliyuncli或者分别执行python -m pip install --upgrade --force pip pip install setuptools==33.1.1...原创 2019-03-19 23:02:44 · 2786 阅读 · 0 评论 -
python安装与卸载模块
一、安装模块1、利用pip安装pip install 模块名2、用源码安装python setup.py install二、卸载:1、如果是用pip安装的,可以直接使用pip uninstall 模块名2、用python setup.py install安装使用python setup.py uninstall模块:1、定时模块APSch...原创 2019-03-16 18:42:49 · 421 阅读 · 0 评论 -
ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
pip install *** --default-timeout=1000或者pip --default-timeout=100 install -U ***原创 2019-03-16 18:46:37 · 442 阅读 · 0 评论 -
pycharm中python项目创建app
在pycharm下方的terminal终端中输入命令:python manage.py startapp "自定义名称"这样就创建了一个APP,django自动生成该名称文件夹。原创 2019-03-21 11:52:04 · 2884 阅读 · 1 评论 -
python3.6安装插件报错error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++
报错如下:error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/ ----------------------------------------Command ...原创 2019-03-25 14:33:32 · 20640 阅读 · 2 评论 -
Django集成mysql数据库
1、安装mysql数据库,执行pip install mysqlclient2、配置数据库连接在项目包下找到setting.py,基本配置如下DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # 数据库驱动 'NAME': 'webdetection', ...原创 2019-03-22 09:25:01 · 410 阅读 · 0 评论 -
centos7下执行firewall-cmd显示ImportError: No module named 'gi'
在安装python时,一般教程都会提示说,安装成功后,yum不能用,需要修改yum配置文件(vim /usr/bin/yum)。 把文件头部的#!/usr/bin/python改成#!/usr/bin/python2.7那么这个方法,继续可以在这个问题上使用:第一步,vim /usr/bin/firewall-cmd, 将#!/usr/bin/python -Es 改为 #!/usr/bin...原创 2019-04-04 09:03:40 · 1305 阅读 · 0 评论 -
pycharm报错django.core.exceptions.ImproperlyConfigured: Requested setting CACHES
配置编辑运行环境打开软件上面运行的程序,点击Edit Configuration...,对Environment variables那一项进行添加,其中name添加DJANGO_SETTINGS_MODULE,value栏添加"项目名.settings",然后运行即可,详见下图...原创 2019-03-27 08:58:38 · 1995 阅读 · 2 评论 -
python报错Connection to Python debugger failed Socket closed
原因是.py文件名称起的有问题,重新命名其他非关键字名称即可,不要太特殊比如我命名一个site.py后debugger始终报错启动不了原创 2019-03-27 09:11:29 · 8280 阅读 · 0 评论 -
centos安装psycopg2报错ERROR: Complete output from command python setup.py egg_info:
先安装依赖包yum install postgresql-devel再按装psycopg2pip install psycopg2原创 2019-05-06 19:02:27 · 2027 阅读 · 2 评论