Skip to content

Creates a lightweight portable python installation from the official python.org

Notifications You must be signed in to change notification settings

iseahound/Portable-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Portable-Python

This shows how you can create a portable installation of Python from the official python.org website. The following script merely automates the steps you need to do to get a working embedded version up and running. Functionality is 100% the same as regular python.

Steps

Make sure you download the Windows embeddable package (64-bit) from:

https://www.python.org/downloads/windows/
  • Drop the Fix Python.ahk script (or Fix Python.exe) into the extracted zip directory.
  • Double check there is a python.exe in the folder.
  • Double click the Fix Python.ahk script.

If successful, the script will self delete.

image

Additional Useful Scripts

You might find it useful to add python to your bin folder or PATH:

@echo off
"%~dp0python\python.exe" %*

You can also suppress the pip warnings

@echo off
if /I "%1"=="install" ("%~dp0python\scripts\pip.exe" %* --no-warn-script-location) else ("%~dp0python\scripts\pip.exe" %*)

Both scripts assume your main folder is called "python" and are dropped in the same directory as the folder called python.

image

You can change the path by adding something between %~dp0 and python such as:

"%~dp0Documents\python\python.exe" %*

which translates to:

.\Documents\python\python.exe

About

Creates a lightweight portable python installation from the official python.org

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published