Does python have a green version of the software, the python green version runs the program

Hello everyone, let me share with you whether there is a green version of python software, many people don't know this yet. Explain in detail below. Let's see now!

Introduction

This article describes how to create a green portable version of python using the conda command (from the Anaconda package ). This version not only has a complete Python environment, but also brings the designated python package Shenma ai pseudo-original .

method

Use the conda create command to specify the output directory and the Python package that needs to be installed integratedly. The script is as follows:

@echo off
set workingDir=%~dp0\..
set pywinDir=%workingDir%\pywin

echo "creating conda..."
set condaRoot=E:\anaconda3
call %condaRoot%\Scripts\activate.bat
call conda create -p %pywinDir% python paramiko natsort

When using, condaRootmodify to the installation directory of anaconda. Then modify conda createthe parameters of the command. In the above example, this command will install paramikoand natsorttwo packages together.

There will be in the generated folder python.exe, you can copy and move the folder as a whole to any location or run it on a computer (windows platform. Other platforms can also achieve the same effect after being made separately under the corresponding platform). The effect is as shown in the figure:

result

reference

Guess you like

Origin blog.csdn.net/mynote/article/details/132339857