Raspberry Pi 4B Raspberry Pi | # Startup Tutorial 08# Configure the Raspberry Pi once and for all (replace the domestic source)

Q: Why should I switch to the domestic apt-getdownload source and pipdownload source?

A: Prevent the download speed from being too slow.

Type the command in the terminal:

	sudo nano /etc/apt/sources.list

#Comment out with a sign at the beginning of the first line , and copy the following content to the last line ( note the version of the Raspberry Pi system installed: Debian 10 Buster, Stretch, Jessie ).

The effect in the figure:

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

note:
Insert picture description here

First press on the keyboard ctrl+x, then press Enter to save, then press yand to enterexit the nano editor to return to the command line interface. Then enter the following command to update to the latest software list of the mirror source of Tsinghua University.

	sudo apt-get update 

Change source to pip:

	sudo mkdir ~/.pip
	ls .pip
	sudo nano pip.conf

Enter the following in the opened file:

[global]
timeout = 10
index-url =  http://mirrors.aliyun.com/pypi/simple/
extra-index-url= http://pypi.douban.com/simple/
[install]
trusted-host=
	mirrors.aliyun.com
	pypi.douban.com

Press on the keyboard first ctrl+x, then press yand entersave to exit the editor and return to the command line interface.


Reference

Guess you like

Origin blog.csdn.net/Naiva/article/details/105216383