python 嵌入版安装

python 嵌入版安装

1. 官方下载 python.org

python-3.11.4-embed-amd64.zip

2 解压,建立pip.ini文件

[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com

3 下载 https://bootstrap.pypa.io/get-pip.py

4 python get-pip.py 会自动建立lib目录

Scripts 目录
pip.exe
pip3.11.exe
pip3.exe
wheel.exe

5 python进入shell后退出

  import sys
  sys.exit()

6 配置环境变量

设置path d:/python d:/python/Scripts

7 打开python311._pth

python311.zip
.

# Uncomment to run site.main() automatically
#import site

D:\\python\\Lib\\site-packages\\

8 查看安装的包

C:\Users\Administrator>pip list
Package    Version
---------- -------
pip        23.1.2
setuptools 68.0.0
wheel      0.40.0

C:\Users\Administrator>python -m pip list
Package    Version
---------- -------
pip        23.1.2
setuptools 68.0.0
wheel      0.40.0

你可能感兴趣的:(python,开发语言)