Raspberry Pi 2- introductory notes and pip install software installation

Software installation command apt-get

Installation package

sudo apt-get install xxx

Mandatory installation

sudo apt-get -f install xxx

re-install

sudo apt-get reinstall xxx

Delete Package

sudo apt-get remove xxx

Delete packages, including deleting profiles, etc.

sudo apt-get remove xxx --purge
  • Delete packages and their dependencies + package configuration files (only 6.10 effective, highly recommended)

sudo apt-get autoremove xxx --purge

Update software list

sudo apt-get update

Update all installed packages

sudo apt-get upgrade

Upgrading the system

sudo apt-get dist-upgrade

Download the source code of the package

apt-get source xxx

&& clean up the archive file to download only clean up obsolete packages

sudo apt-get clean && sudo apt-get autoclean

Check for damage dependence

sudo apt-get check

Note: apt-get package downloaded new location

/var/cache/apt/archieveSoftware installation is under cache
sudo apt-get autoclean(delete only low version of the deb package)
sudo apt-get clean(delete all)
General deb packages are installed: /usror /usr/shareor /usr/localdirectory


Reference Links : https://www.jianshu.com/p/a52a9d30f903

Replace domestic sources

Enter the following terminal

sudo nano /etc/apt/sources.list

with the # comment out the original contents of the file, replace with the following:

the deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ Buster main contrib non-Free RPI
the deb the src- http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ Buster main contrib non-free rpi

where I use Tsinghua source, behind an error if the download source USTC try transducer (Ps: USTC http://mirrors.ustc.edu.cn/raspbian/raspbian/ source address
corresponding to the line alternative)

Note: Many online is stretch, which is the previous version, has now changed buster, and before bloggers is because of this infinite black screen.
So if you have a newer version of Raspberry Pi, I just use my code is on the line, the old version of the self-test backup.
FIG:
Then ctrl + o save, save Confirm point, then exit ctrl + x

Enter the following terminal ② **

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

with the # comment out the original contents of the file, replace with the following:

Deb Http://Mirrors.Tuna.Tsinghua.Edu.Cn/raspberrypi/ Buster Main Ui
Deb-Src Http://Mirrors.Tuna.Tsinghua.Edu.Cn/raspberrypi/ Buster Main Ui

如图:

Then ctrl + o save, press Enter to save point, then ctrl + x to exit

③ command to update the software using the source list, and check the edit is correct. And then update the software

APT-GET Update sudo
  sudo APT-GET upgrade
----------------
Original link: https: //blog.csdn.net/weixin_43287964/article/details/101696036

PIP3

Basic instructions

Installation pip3

sudo apt install python3-pip

Upgrade pip3

Although the system gives the command to update the pip, it is recommended to use

sudo pip3 install --upgrade pip

To update pip3.

Pip of difference and pip3

python differentiated python2 and python3 are
then pip there pip and pip3 difference
pip is python package management tool, different pip and pip3 versions are located under Scripts \ directory:
If only Python2 installed, then it can only use pip .
If only the Python3 installed, you may be used pip PIP3 may also be used, both are equivalent.
If both the Python2 and Python3 installation, the pip by default to Python2, PIP3 with Python3 assigned.

Dependencies Introduction

Some packages depend on other packages, in order to operate. A programming language that can relies on a compiler, a game engine graphics files. These dependencies are referred to in Linux

Since one of the biggest reasons for using the package manager rather than manually installing the software. If a package depends on other packages, apt will automatically find them, and ready to install them. If this happens, it will give a prompt asking whether you want to continue.

If you continue, the keyboard to enter letters Y, and then press ENTER. (Canceled mounting enter the letter N, if you want to cancel the installation is required in pressing CTRL + C)


Original link: https://blog.csdn.net/DarrenXf/article/details/82952004

Replace domestic sources

pip replaced by domestic sources, can greatly improve the success rate and speed of installation.

First create a folder, then create the file

  1 mkdir ~/.pip
  2 nano ~/.pip/pip.conf

Add the following

   [global]
   timeout =6000
   index-url =http://pypi.douban.com/simple/
   [install]
   use-mirrors =true
   mirrors =http://pypi.douban.com/simple/
   trusted-host =pypi.douban.com

Domestic source list
Ali cloud http://mirrors.aliyun.com/pypi/simple/
China University of Science and Technology https://pypi.mirrors.ustc.edu.cn/simple/
watercress http://pypi.douban.com/simple
Python official https://pypi.python.org/simple/
v2ex http://pypi.v2ex.com/simple/
Chinese Academy of Sciences http://pypi.mirrors.opencas.cn/simple/
Tsinghua University https: // pypi .tuna.tsinghua.edu.cn / the Simple
/ ----------------
reference Linkshttps://blog.csdn.net/qq_40584960/article/details/86080904


Temporary installation from the mirror source

When using the installation files pip: pip install <package name> -trusted-host pypi.douban.com

For example: pip install pyquery -trusted-host pypi.douban.com

To install django, for example:
PIP install -i https://pypi.doubanio.com/simple/ Django
PIP install -i https://pypi.doubanio.com/simple/ --trusted-Host pypi.doubanio.com Djang

NOTE:
-i https://pypi.doubanio.com/simple/    ------ indication bean source (-i == --index-URL)
--trusted-Host pypi.doubanio.com --- ----- expressed confidence Add

description link: https://blog.csdn.net/wls666/article/details/95456309

Guess you like

Origin www.cnblogs.com/nightowl/p/10668933.html