In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of "how to install pip on Linux, Mac and Windows systems". The editor shows you the operation process through an actual case. The method of operation is simple, fast and practical. I hope this article "how to install pip on Linux, Mac and Windows systems" can help you solve the problem.
Python is a powerful and popular programming language. It has rich software packages to use in many aspects, such as conventional programming, data science and so on. However, these packages are usually not automatically shipped with Python installation, but need to be downloaded, installed and managed by the user. All of these packages (including libraries and frameworks) are stored in a central repository called PyPI (Python package Index Python Package Index), and pip (Preferred Installer Program, the preferred installer) is the tool for managing this central repository.
After pip is installed, it becomes convenient to manage PyPI's software packages. Most packages can be installed by executing commands such as python-m pip install at the terminal or command line interface. Newer versions of Python 3 (3.4or higher) and Python 2 (2.7.9 or above) are pre-installed with pip, while older versions of Python do not have their own pip, but can be installed separately.
First you need to install Python
First of all, you need to install Python on your system, otherwise the pip installer will not understand any relevant commands. You can execute the python command in the command line interface, Bash or terminal to confirm whether Python is installed on the system. If the system does not recognize the python command, please download Python and install it first. After the installation is complete, you can see some prompts that guide you to install pip.
Install pip on Linux
The commands to install pip vary from release to release of Linux.
On Fedora, RHEL, or CentOS, execute the following command to install:
$sudo dnf install python3-pip
On Debian or Ubuntu, use the apt package management tool to install:
$sudo apt install python3-pip
Other distributions may also have different package management tools, such as Arch Linux using pacman:
$sudo pacman-S python-pip
Execute the pip-version command to confirm that pip is installed correctly.
Installing pip on a Linux system is so simple that you can skip to the "use pip" section to continue reading.
Install pip on Mac
MacOS already has Python pre-installed, but the Python version is generally older. If you want to use Python, it is recommended to install Python 3.
You can install Python 3 using homebrew on Mac:
$brew update & & brew upgrade python
If you install the new version of Python 3 mentioned above, it comes with the pip tool. You can verify it with the following command:
$python3-m pip-- version
If you are using Mac and the installation process is over, you can continue to read from the "using pip" section.
Install pip on Windows
The following pip installation procedures are for Windows 8 and Windows 10. The screenshot in the following article is a screenshot of Windows 10, but it also applies to Windows 8.
First verify that Python has been installed.
If you want to use package management tools like Linux on Windows systems, Chocolatey is a good choice, which makes it easier to call and update Python. Chocolatey can be run in PowerShell, and Python can be installed with a simple command.
PS > choco install python
You can then use pip to install the required packages.
Use pip
Pip is used in the same way on Linux, BSD, Windows, and Mac.
For example, install a library:
Python3-m pip install foo-- user
Uninstall one of the installed libraries:
Python3-m pip uninstall foo
Find the package by name:
Python3-m pip search foo
Update pip to a new version:
$sudo pip install-upgrade pip
It is important to note that there is no need to precede the sudo command in the Windows system because Windows manages user rights in a unique way, corresponding to creating an enforcement policy exception.
Python-m pip install-- upgrade pip's content on "how to install pip on Linux, Mac, and Windows systems" ends here. Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.