ntlarson
ntlarson

Reputation: 181

Installing the Pyramid Framework on a disconnected system

I am working in Python and have decided to focus on learning Pyramid as my primary framework. The problem is that the work I do is done on a private LAN with no external connectivity and I cannot find any resource to get all the packages needed to setup the virtual environment and pyramid on a system without access to the open internet.

Any ideas or resources anyone might have would be greatly appreciated.

Thanks

Upvotes: 3

Views: 459

Answers (3)

ntlarson
ntlarson

Reputation: 181

Hello and thanks for the two options put forward in attempt to answer this question. I was unable to get back to this problem until recently at which point I read these answers and tried one of them before stumbling across the best solution.

Given everything else I was working with was being done from source I tried that (thanks for the link I had been unable to find the source prior) and as I feared I was unable to install pyramid that way given the number of dependencies it needs to install along with it. This however did give me the ability to see exactly what the dependency packages were.

I was getting ready to try the other option with the virtualenv relocatable flag but before I did I came across an option in pip, which is installed as part of virtualenv, that allows you to bundle packages and install them later without the need of a network connection. This ended up being the solution I tried and it worked. At least mostly.

The solution to the basic question is this.

1)Change directories to your virtualenv dir

[user home]$ cd /path/to/virualenv/directory

2)Type the following on a network connected system and it will download the pyramid files and dependencies into the bundle file

[virtualenv_directory]$ bin/pip bundle <nameOfBundle>.pybundle pyramid

3) move to target system and cd to target directory as above and install with the following command

[virtualenv_directory]$ bin/pip install <nameOfBundle>.pybundle

and in this case it will install the pyramid files and dependencies.

Upvotes: 2

grncdr
grncdr

Reputation: 956

The simplest way to do this is install it in a virtualenv on a machine outside the network, using the same version of Python as what you use inside the closed network. Then use virtualenvs --relocatable flag to make the environment relocatable, before copying it to physical media that you can bring in to your closed network. By far the most difficult part will be if Pyramid or any of it's dependencies have compiled extensions, as the compiled binaries are very unlikely to be portable.

If they do, the best alternative is to use something like ClueReleaseManager on your external machine, and install Pyramid using it as your primary PyPI mirror (instructions on how to set it up are on the linked page). This will pull down all the source packages into a single directory that you can then bring into your closed environment to compile. This will save you the hassle of manually downloading all of the dependencies, but the setup cost is a bit high.

Upvotes: 1

tjarratt
tjarratt

Reputation: 1690

They have the source available for download on the package page -- couldn't you just download the source and then bring it into your environment on a usb drive? As far as other required packages, it should be fairly easy to install it via pip and see what the dependencies are -- you could then just bring all of that in. In fact, the dependencies are all listed on the package page.

In general, if you're working with a closed network, you're going to have to bring it in somehow, right? Just do that however you can.

Upvotes: 1

Related Questions