This is a portable bundle for Windows, designed to be easily distributed and used without installation and hardcoded absolute path dependencies.
<bundle>
└───python3
├───python3.exe
├───Scripts/
├───Lib/
├───...
└───pip_wrapper
├───scripts/
├───pip.py
├───bin/
├───pip.exeTo use the portable Python bundle on Windows, download from latest release and extract to whatever location you prefer: i.e. <bundle>:
-
Activate in a
cmd.exeshell:call <bundle>\activate.cmd
-
OR Activate in a
PowerShellinstance:. <bundle>\activate.ps1
-
Use Python just as normal after the environment is activated For example: to install ``Jupyter Notebook:
pip install notebook
This creates a
<bundle>\python3\Scripts\jupyter.exethat is already in the PATH of our activated environment.So, to start Jupyter Notebook, run this command directly from our
cmdShell orPowerShellinstance:jupyter notebook
To build the portable Python bundle, you can use the provided build_bundle.ps1 PowerShell script. This script automates the process of downloading and setting up the portable Python environment.
- Open PowerShell and navigate to the directory containing the
build_bundle.ps1script. - Run the script:
.\build_bundle.ps1 - Follow the prompts to specify the desired Python version and other options.