0.前言:当前,python主流版本是3.x.x,但有时候需要用到python2.7.x文章来源:https://www.toymoban.com/news/detail-628206.html
1.从官网下载python2.7.18安装包
下载地址:https://www.python.org/downloads/windows/
2.安装python2.7.18(默认安装:C:\Python27)
3.将C:\Windows\System32\python27.dll文件拷贝至C:\Python27
4.将Python27目录打包至新的设备
5.注意事项:
(1)在新的设备上运行python2.7.18,需要确保安装了:VC2008运行库(python27依赖的vc ++库)
(2)若有多个pip(比如安装python3环境),在新的设备上运行pip需加:python -m
6.一键启动临时环境变量bat
@echo off
title python2.7.18
set path=%cd%;%cd%\Scripts;%path%
echo ===============================
echo ===============================
echo ====use pip: python -m pip ....====
echo ===============================
echo ===============================
@cmd文章来源地址https://www.toymoban.com/news/detail-628206.html
到了这里,关于python2.7.18绿色安装包制作的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!