admin管理员组

文章数量:1613368

1、下载 Windows embeddable package (64-bit)

Python Releases for Windows | Pythonhttps://www.python/downloads/windows/下载后解压缩到一个文件夹,例如:dlls。

2、dlls文件夹中制作一个pip.ini,内容是:

[global]

index-url=http://mirrors.aliyun/pypi/simple/

[install]

trusted-host=mirrors.aliyun

3、dlls文件夹中制作一个get-pip.py(utf8格式),内容是:

https://bootstrap.pypa.io/get-pip.pyhttps://bootstrap.pypa.io/get-pip.py或者从这里下载:

Installation - pip documentation v22.0.dev0https://pip.pypa.io/en/latest/installation/#get-pip-py

4、修改 python310._pth,去掉import site前的注释,这样 "\lib\site-packages"才会加入sys.path中 。

5、运行这个py:

python get-pip.py

可以看到安装了 pip-21.3.1 setuptools-60.5.0 wheel-0.37.1

Successfully installed pip-21.3.1 setuptools-60.5.0 wheel-0.37.1

6、检查pip安装是否成功:

运行:

python -m pip -V

输出:

pip 21.3.1 from D:\cbq\0freepy\bin\dlls\lib\site-packages\pip (python 3.10)

本文标签: 步骤embeddableWindowsPythonpip