树莓派学习笔记(卸载python2.7、镜像源和屏幕)

今天一波睿智操作,想着把python2.7代码改成python3.7,害怕2.7的干扰直接卸掉sudo apt-get remove python2.7,高高兴兴地重启,结果悲剧了,重新烧录了好几次,没有想到python2.7的依赖关系,上网找黑屏的原因也没有找到,结果在找卸载python2.7时找到了,树莓派桌面用的是python2.7,不懂底层的话没事不要把python2.7卸掉。轻易不要使用中文,用putty或者xshell会出现乱码的

卸载python2.7的正确方法

删除依赖关系

sudo rm /usr/bin/python

添加依赖关系

sudo ln -s /usr/bin/python3.7 /usr/bin/python

结果:
在这里插入图片描述

镜像源

软件源

sudo nano /etc/apt/sources.list

使用过清华的源最快,注释掉以前的,添加下面这个就行

http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi

系统源

sudo nano /etc/apt/sources.list.d/raspi.list

注释掉以前的也是清华的源

deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main

固定ip地址

sudo nano /etc/dhcpcd.conf

找到并添加(我用的是无线网,有线网直接在原来的上面改)
在这里插入图片描述

static ip_address = 你的ip地址/24static routers=
ip地址用ifconfig进行查看

设置屏幕长亮

sudo nano /etc/lightdm/lightdm.conf

修改成
在这里插入图片描述
-s:设置屏幕保护不启动,-dpms:关闭电源节能管理

树莓派LCD驱动/2.8/3.2/3.5/3.97/4.3/5/7等! You can focus on the following GitHub web site, for the latest lcd drivers: https://github.com/goodtft/LCD-show =============================================================================================================== "LCD-show-170315.tar.gz" just for Raspbian (Release date:2017-03-02) or later, DO NOT use it for the Raspbian version before 2017-03-02. ================================================================================================================ "LCD-show-160701.tar.gz" support Raspbian version before Raspbian-2017-02-16,such as(2017-02-16,2017-01-11, 2016-11-25,2016-09-23,2016-05-27,2016-05-10,2016-03-18,or earlier). And This Driver also tesed on "kali-2.1.2" ,"ubuntu-mate-16.04-beta2" ================================================================================================================ How to Install: 1.)Step1, Install Raspbian official mirror a)Download Raspbian official mirror: https://www.raspberrypi.org/downloads/ b)Use“SDFormatter.exe”to Format your TF Card c)Use“Win32DiskImager.exe” Burning mirror to TF Card 2.) Step2, Clone my repo onto your pi git clone https://github.com/goodtft/LCD-show.git chmod -R 755 LCD-show cd LCD-show/ 3.)Step3, According to your LCD's type, excute: In case of 2.8" LCD sudo ./LCD28-show In case of 3.2" LCD sudo ./LCD32-show In case of 3.5" LCD sudo ./LCD35-show In case of 3.97" LCD sudo ./LCD397-show In case of 4.3" LCD sudo ./LCD43-show In case of 5" LCD sudo ./LCD5-show In case of 7inch(B)-800X480 RPI LCD sudo ./LCD7B-show In case of 7inch(C)-1024X600 RPI LCD sudo ./LCD7C-show If you need to switch back to the traditional HDMI display sudo ./LCD-hdmi Wait a few minutes,the system will restart automaticall , enjoy with your LCD.
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值