0.前言:当前,python主流版本是3.x.x,但有时候需要用到python2.7.x
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
文章出处登录后可见!
已经登录?立即刷新