Free installation version python install pip module.md
Free installation of python
Download a portable Python version
Go to the download page of the official Python website , select a suitable portable version (for example, Python 3.8.12 64-bit compact version) in the "Looking for a specific release?" drop-down menu, and download the corresponding compressed file (format) zip
.
Unzip the portable Python version
After the download is complete, unzip the compressed file to your desired directory, such as C:\PortablePython
.
run portable python
Enter the decompressed folder, find an python.exe
executable file named in the folder, and double-click to run it. This will start a command-line terminal, use this terminal to run your Python script. If you want to run python
commands directly through the command line, you need to configure path
environment variables and add python
the installation path path
to the bottom:
[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-dM0uFewe-1692771194372) (C:\Users\tengwang8\AppData\Roaming\Typora\typora-user-images\ image-20230823095317490.png)]
Open it again cmd
and runpython --version
If the version is good, the configuration is successful.
Install the pip module
Use the built-in ensurepip installation
In a command-line terminal, enter the following command to install the pip module:
python -m ensurepip
Mode installation using get-pip.py
-
Download the get-pip.py script : Open a browser, go to the https://bootstrap.pypa.io/get-pip.py link, right-click the "Raw" button on the page, and select "Save As" to save this script file . Save it to your desired directory, eg
C:\Temp\get-pip.py
. -
Run the get-pip.py script : Open a terminal, navigate to
get-pip.py
the directory where you saved , and run the following command to installpip
:python get-pip.py
If you have multiple Python versions, make sure to run this command with the correct version. You can
python3
specify a specific version of the Python interpreter using the or full path. -
Verify pip installation : After the installation is complete, you can run the following command to verify
pip
that it has been successfully installed:pip --version
If no error message appears, the installation
pip
has been successful.