0% found this document useful (0 votes)
8 views

Transfer_Python_Project_Numba_Airgapped

How to install python packages in an air gapped systems

Uploaded by

Bimlendu Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Transfer_Python_Project_Numba_Airgapped

How to install python packages in an air gapped systems

Uploaded by

Bimlendu Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Transferring Python Project with Numba to an Air-Gapped Machine

Step 1: Freeze the dependencies on the source machine


On the source machine, activate the virtual environment and run:
```bash
pip freeze > requirements.txt
```

Step 2: Download the required packages


Still on the source machine (which has internet access), use `pip` to download Numba:
```bash
mkdir packages
pip download -d packages numba
```

Step 3: Transfer the project folder and packages


Copy the following to the air-gapped machine:
- The project folder (including your Python code)
- The `packages` folder with the downloaded Numba package

Step 4: Create a virtual environment on the air-gapped machine


On the air-gapped machine, create a new virtual environment:
```bash
python -m venv venv
```

Step 5: Activate the virtual environment


```bash
# On Windows
venv\Scripts\activate

# On macOS/Linux
source venv/bin/activate
```

Step 6: Install Numba from the local `packages` folder


With the virtual environment activated, run:
```bash
pip install --no-index --find-links=packages numba
```

You might also like