自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 收藏
  • 关注

原创 2021-10-13

安装Crypto失败背景解决方法背景需要使用AES,所以用到了Crypto库,但是安装失败,网上各种教程,包括将安装库的文件名修改掉,但是都不好使解决方法from Cryptodome.Cipher import AESpip install pycryptodomex...

2021-10-13 17:06:10 96

原创 Ubuntu20.04 apt-get upgrade 无法下载的问题

Ubuntu20.04 apt-get upgrade 无法下载的问题原因是镜像不好用了,需要更新一下镜像操作备份之前的镜像sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup更新镜像 gedit /etc/apt/sources.list将文件中的内容换为此链接里的镜像:https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/4. 重新测试 apt-get upgrade

2021-05-30 10:08:02 1379

原创 Python2.7设置字体颜色

Python2.7设置字体颜色代码示例运行结果代码示例# coding=utf-8HEADER = '\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 243

原创 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 144 1

原创 Ubuntu16.04安装chrome

安装命令1.sudo wget http://www.linuxidc.com/files/repo/google-chrome.list -P /etc/apt/sources.list.d/2.wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -3.sudo apt-get update4.sudo apt-get install google-chrome-stable5./u

2021-03-24 19:17:18 126 1

原创 tar: Error is not recoverable: exiting now

使用tar解压时报错tar -zxvf goland-2020.3.4.tar.gz报错如下:gzip: stdin: unexpected end of filetar: Child returned status 1tar: Error is not recoverable: exiting now原因:.tar.gz安装包没有下载完整,重新下载即可

2021-03-23 11:10:54 387

原创 Goland run特变慢的问题

写好代码之后,选择这个进行运行,一直没有反应,一直在编译,状态是这样的:解决办法,用命令:

2021-03-12 19:31:38 2119 1

原创 Building wheel for sasl (setup.py): finished with status ‘error‘

Building wheel for sasl (setup.py): startedBuilding 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 1753

原创 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 119

原创 There are test failures

java项目在install、verify,test时出现There are test failures解决方案:如果直接向让它不报错,那直接添加以下配置就可以。但是这样的后果是错误的测试被忽略了<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configu

2021-03-02 19:47:24 957

原创 sys.stderr.write(f“ERROR: {exc}“)

Ubuntu16.04升级pip之后出现sys.stderr.write(f"ERROR: {exc}")解决方案:1.获取get-pip.py旧版本curl https://bootstrap.pypa.io/2.7/get-pip.py --output get-pip.py2.安装 python get-pip.py

2021-02-18 15:02:28 822

原创 ubuntu20.04安装java1.8环境

1.下载jdk,官网下载https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html此文选择的jdk是:说明:选择和系统对应的版本下载,如果在后续的安装中出现下面这种情况,则说明下载的版本不对:bash: /usr/local/java/jdk1.8.0_171/bin/java: 无法执行二进制文件: 可执行文件2.解压到自己要保存的路径3.配置环境变量sudo vi /etc/profile在最

2021-02-08 10:54:09 3255

原创 正在等待缓存锁:无法获得锁 /var/lib/dpkg/lock-frontend。锁正由进程 2786(unatten-upgr)持有

在执行sudo apt安装时,会出现无法获得锁的情况可以从图中看出进程ID,直接将进程kill就行sudo kill 进程ID之后即可正常执行命令:sudo apt install

2021-02-07 09:33:10 10337 5

原创 ubuntu20.04安装M2Crypto error: command ‘x86_64-linux-gnu-gcc‘ failed with exit status 1

看了网上很多答案,包括:apt-get install build-essential libssl-dev swig python3-devpip3 install M2Cryptosudo apt-get install python3 python-dev python3-dev \ build-essential libssl-dev libffi-dev \ libxml2-dev libxslt1-dev zlib1g-dev \ python-pips

2021-02-05 16:26:23 493

原创 source not found

在ubuntu激活虚拟环境的时候出现:source not found原因:shell的解释器不是bash,而是dash,我们需把shell的解释器更改为bash。分三步进行:第一步:查看当前使用的解释器是什么?命令:ls -l /bin/sh输出: /bin/sh -> dash第二步:修改dash为bash由于这一步需要root权限,所以先切换到root用户命令:su root,然后输入密码即可命令:dpkg-reconfigure dash按tab键选择否,然后回车第三

2021-02-02 15:36:28 396 1

原创 Ubuntu安装pip2错误解决方案

**Ubuntu安装pip2错误**按照网上很多教程都是下载pip.tar.gz文件,然后解压,安装sudo python2 setup.py install,会报错ImportError: No module named setuptools然后去下载setuptools,解压安装,还是会报错。解决方案:**直接执行命令:sudo apt-get install -y python-setuptools**检测一下:pip -V输出:pip 9.0.1 from ///*/pyth

2021-02-02 14:35:56 207

原创 2020-12-15

**django.core.exceptions.AppRegistryNotReady: Apps aren’t loaded yet. (django 3.1.4 )(Python 3.8)就这个错误我搞了半天,在网上找了各种帖子,各种尝试都没有解决。**解决办法,看看你的__init__py文件里面有没有引用urls和views,如果有请删除,然后再次运行就ok了****...

2020-12-15 15:37:57 112

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除