python 绿色版安装说明

习惯了安装绿色版

但是python 绿色版安装不了pip,解决办法

  • 按照正常步骤操作安装
  • 解压,配置环境变量
  • 重要

这是由于我们下载的是嵌入式版本,默认初始化时不导入 site 模块。

用记事本打开 python37._pth 文件,把 #import site 这行的第一个字符 # 删掉,然后保存。
重新运行 python.exe,会发现新窗口里多了 Type “help”, “copyright”, “credits” or “license” for more information. 一行,在 >>> 后输入 exit() 也可以正常退出了。

Note
The embedded distribution does not include the Microsoft C Runtime and it is the responsibility of the application installer to provide this. The runtime may have already been installed on a user’s system previously or automatically via Windows Update, and can be detected by finding ucrtbase.dll in the system directory.

就是没有微软C类库之类的一堆东西。。。

上一篇
下一篇