-
Notifications
You must be signed in to change notification settings - Fork 195
How do I install MSTICPy in an isolated environment (No Internet)
Ian Hellen edited this page Nov 23, 2021
·
1 revision
The problem here is needing to access PyPI for the MSTICPy package and its dependencies.
The solution is to create an archive of the required files, then move this archive to a location accessible to the offline hosts/VMs.
- Download a copy of requirements-all.txt from /~https://github.com/microsoft/msticpy.
- Create a folder to store the downloaded packages
Linux
md mp-packages
Windows
mkdir mp-packages
- Create the package archive
python -m pip download -r requirements.txt -d ./mp-packages
- (optional) Bundle the package contents into a single file
Linux
tar cvfz mp-packages.tar.gz mp-packages
Windows
tar -cf mp-packages.tar mp-packages
Now move the tar file to a location accessible from the isolated hosts.
- Unpack the archive
Linux
mkdir mp-packages
cd mp-packages
tar zxvf mp-packages.tar.gz
Windows
mkdir mp-packages
cd mp-packages
tar -xf mp-packages.tar
- Use the
-f
flag to point pip at the package archive
python -m pip install -f . --no-index msticpy[all]
If you are making the package archive path available via HTTP or SMB share, substitute the URL or share path for the "." in the above example:
python -m pip install -f http://pkg-host/mp-packages --no-index msticpy[all]
python -m pip install -f \\pkg-host\mp-packages --no-index msticpy[all]