Tilo Mitra's avatar

报错django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17).

报错信息django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17).解决方案卸载django: pip3 uninstall django 安装低版本: pip3 install django==1.1.11查看sqlite3版本sqlite3 --version下载:wget http://www.sqlite.org/2019/sqlite-autoconf-3280000.tar.gz解压:tar zxvf sqlite-autoconf-3280...

Tilo Mitra's avatar

linux机器重启报错 Failed to load SELinux policy. Freezing

错误原因配置关闭SELinux,结果误操作cd /etc/selinux/config但是误将“SELINUXTYPE”看成“SELINUX”,设置了SELINUXTYPE参数:#SELINUXTYPE=targeted   原始配置 这个不必修改。正确配置SELINUX=disabledSELINUXTYPE=targeted1. 重启时在启动页面,选择你要启动的内核 按 E, 进入 grub 编辑页面。2. 找到 linux16 那一行,在language 后面 也就是LANG=zh_CN.UTF-8,空格 加上 selinux=0 或者 enforci...

Tilo Mitra's avatar

错误SyntaxError: Non-ASCII character '\xe4' in file cmd.py on line 12, but no encoding declared; see h

SyntaxError: Non-ASCII character '\xe4' in file cmd.py on line 12, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details解决python2 会出现以上问题,python3以上版本不会在文件的开头加#-- coding:utf-8 --必须在文件第一行开头写否则加了也会出错以上错

Tilo Mitra's avatar

报错AttributeError: module 'pexpect' has no attribute 'spawn'

报错AttributeError: module 'pexpect' has no attribute 'spawn'原因是Windows下无法运行,并不代表没有spawn解决方案在linux下运行

Tilo Mitra's avatar

使用ssh连接ubantu

打卡ubantu命令行sudo apt-get updatesudo apt-get install openssh-clientsudo apt-get install openssh-serversudo service ssh startsudo apt install net-toolsifconfig

Tilo Mitra's avatar

ubantu默认的root密码修改

1.Ubuntu的 默认root密码是随机的,即每次开机都有一个新的root密码。我们可以在终端输入命令 sudo passwd回车后终端会提示我们输入新的密码并确认,此时的密码就是root新密码。root管理员登录命令su root再输入新的密码就ok了。

Tilo Mitra's avatar

邮件发送

import yagmaildef send_email(contents,send_to = 'xx@qq.com'): #send_to 接收人 #登录邮箱,设置登录的账号,密码和port等信息 yag = yagmail.SMTP(user = 'xx@163.com',password = 'xx', host = 'smtp.163.com') #user发送人 #登录完即可一件发送,设置发送给谁,和邮件主题,邮件内容 yag.send(to = send_to, subject = '...

Tilo Mitra's avatar

文件夹和文件操作

#递归删除当前目录下所有文件(不包括目录)# import os# def filedir(Infile):# if os.path.isdir(Infile):# for file in os.listdir(Infile):# path = os.path.join(Infile,file)# filedir(path)# if os.path.exists(Infile):# try:# os.rmdir(Infile)# ...

Tilo Mitra's avatar

链家网站爬取

import requestsimport pandas as pdfrom lxml import etreeimport timefrom multiprocessing.dummy import Poolstart = time.time()title = []house = []place = []rent = []area = []direction = []distinguish = []detail = { "标题": title, "房屋户型": house, "位置": place, "月租金": rent, "面积": area, ...

下一页  

湘ICP备19016894号 © 2019 小钱