https://github.com/julianolf/sandboxing
📦 Install Python programs in a safe and isolated environment.
https://github.com/julianolf/sandboxing
installer-script python
Last synced: 8 months ago
JSON representation
📦 Install Python programs in a safe and isolated environment.
- Host: GitHub
- URL: https://github.com/julianolf/sandboxing
- Owner: julianolf
- License: mit
- Created: 2025-01-12T18:56:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-25T21:43:00.000Z (about 1 year ago)
- Last Synced: 2025-10-11T21:10:03.003Z (8 months ago)
- Topics: installer-script, python
- Language: Python
- Homepage:
- Size: 73.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sandboxing

Install Python programs in a safe and isolated environment.
This script is intended to be used as an installation tool for Python programs that do not have their own installation method with dependency isolation. It uses Python's built-in modules **venv** and **pip** to create a virtual environment, install the program along with its dependencies inside that environment, and create symbolic links for the executable scripts registered in the Python package.
### Requirements
Python 3.7+ with **venv**, **pip**, and **ensurepip** installed.
Most Python installations come with **venv**, **pip**, and **ensurepip** by default.
## Usage
For a better user experience, copy the `install.py` script and define your package and flags directly in the code so users can omit the extra arguments after `python3 -`.
The examples below are for illustration purposes and can be run as-is to test the script.
Installing the latest version of **cowsay** from PyPI:
```sh
curl -sSf https://raw.githubusercontent.com/julianolf/sandboxing/refs/heads/main/install.py | python3 - cowsay
```
Installing a specific version:
```sh
curl -sSf https://raw.githubusercontent.com/julianolf/sandboxing/refs/heads/main/install.py | python3 - cowsay --version=6.0
```
To update a previously installed program, simply run the installation script again.
To uninstall a program:
```sh
curl -sSf https://raw.githubusercontent.com/julianolf/sandboxing/refs/heads/main/install.py | python3 - cowsay --uninstall
```
For more options and usage, run:
```sh
curl -sSf https://raw.githubusercontent.com/julianolf/sandboxing/refs/heads/main/install.py | python3 - --help
```