Creating the required python environment when constrained by limited user access rights - SimonBiggs/electronfactors GitHub Wiki

It appears to be common place to have a rather locked down computer. The following steps were followed to install the python environment and electronfactors module on a computer that had no console access and required username and password login to access the internet.

Installing Anaconda

Download Anaconda Python 3.5 from continuum.io/downloads.

Install Anaconda

  • Make sure to install for "Just Me" -- doesn't need administrator privileges.
  • Install Anaconda within "My Documents"
    • For example your destination folder might read "C:\Users\username\Documents\Anaconda"
  • No need to make sure that "Add Anaconda to my PATH environment variable" and "Register Anaconda as my default Python 3.5" are ticked if these cause issues during the install. We will manually add Anaconda to the MobaXterm path variable whenever the user types bash (see below).

Installing and setting up a terminal shell for use with Anaconda

Download MobaXterm portable edition from mobaxterm.mobatek.net/download-home-edition.html.

Extract MobaXterm and run it.

Within settings > configuration set the "Persistent home directory" to "My Documents". Once set the text after Persistent home directory should read _ProfileDir_\Documents.

Press the button, "Start local terminal".

Copy the following into the terminal and run it:

echo 'export PATH=~/Anaconda:~/Anaconda/Scripts:~/Anaconda/Library/bin:$PATH' >> ~/.bashrc

Now MobaXterm is ready for use with Anaconda.

Installing the required packages

Open MobaXterm, and press the button "Start local terminal".

Write

bash

Now we can access the Anaconda python commands.

Download the Shapely module from here. Place the downloaded file within "My Documents".

  • If you have 64-bit windows with python 3.5 you will be looking for Shapely-*.*.*-cp35-none-win_amd64.whl (with * replaced by most recent shapely version).

To install the required packages run within the MobaXterm terminal the following. This assumes that the Shapely file downloaded was version 1.5.13, change what is written here to match the Shapely filename.

pip install Shapely-1.5.13-cp35-none-win_amd64.whl descartes electronfactors --proxy=http://username:[email protected]:8080

Running within the Jupyter Notebook

Open MobaXterm, and press the button "Start local terminal".

Write and run:

bash

To open the jupyter notebook write:

jupyter notebook

A standalone notebook demonstrating use of the electronfactors package can be downloaded from here:

Spline modelling electron insert factors using routine measurements.ipynb

If you download that file and drop it into "My Documents" you should be able to access it from the jupyter browser window.

Running within Spyder

Open MobaXterm, and press the button "Start local terminal".

Write and run:

bash

To open Spyder write and run:

spyder

A standalone python script demonstrating use of the electronfactors package can be downloaded by right clicking on the following file and going "Save link as". Save the file within "My Documents" to be able to access it within Spyder.

Spline modelling electron insert factors using routine measurements.py

Then within Spyder open the python script and then run it with the default options.