Installation¶
Preparing for pyNSID¶
pyNSID requires many commonly used scientific and numeric python packages such as numpy, h5py etc. To simplify the installation process, we recommend the installation of Anaconda which contains most of the prerequisite packages, conda - a package / environment manager, as well as an interactive development environment - Spyder.
Do you already have Anaconda installed?
No?
Yes?
Is your Anaconda based on python 3.6+?
No?
Uninstall existing Python / Anaconda distribution(s).
Restart computer (not necessary but highly recommended, especially for Windows)
Yes?
Proceed to install pyNSID
Compatibility¶
pyNSID is compatible with python 3.6 onwards. Please raise an issue if you find a bug.
We do not support 32 bit architectures
We only support text that is UTF-8 compliant due to restrictions posed by HDF5
Terminal¶
Installing, uninstalling, or updating pyNSID (or any other python package for that matter) can be performed using the Terminal
application.
You will need to open the Terminal to type any command shown on this page.
Here is how you can access the Terminal on your computer:
Windows - Open
Command Prompt
by clicking on the Start button on the bottom left and typingcmd
in the search box. You can either click on theCommand Prompt
that appears in the search result or just hit the Enter button on your keyboard.Note - be sure to install in a location where you have write access. Do not install as administrator unless you are required to do so.
MacOS - Click on the
Launchpad
. You will be presented a screen with a list of all your applications with a search box at the top. Alternatively, simultaneously hold down theCommand
andSpace
keys on the keyboard to launch theSpotlight search
. Typeterminal
in the search box and click on theTerminal
application.Linux (e.g - Ubuntu) - Open the Dash by clicking the Ubuntu (or equivalent) icon in the upper-left, type “terminal”. Select the Terminal application from the results that appear.
Installing pyNSID¶
Ensure that a compatible Anaconda distribution has been successfully installed
Open a terminal window.
You can now install pyNSID via either the
pip
orconda
methods shown below. Type the following commands into the terminal / command prompt and hit the Return / Enter key:pip:
pip install pyNSID
Offline installation¶
In certain cases, you may need your python packages to work on a computer (typically the computer that controls a scientific instrument) that is not connected to the internet. In such cases, the aforementioned routes will not work. Please follow these instructions instead:
Recall that pyNSID requires python and several other packages. Therefore, you will need to:
Download the Anaconda installer from a computer is online
Download the pyNSID repository from GitHub via this link
Similarly, download source code for our dependencies, mainly h5py,
dask
, and sidpy
Copy the Anaconda installer resultant zip files to the offline computer via a portable storage device like a USB pen drive
Install Anaconda
Unzip the zip files for the packages
Open a terminal window
Install these packages in this sequence (h5py, dask, sidpy, pyNSID) by:
navigating to the folder where you unzipped the contents of the zip file via
cd
commandsType the following command:
python setup.py install
Installing from a specific branch (advanced users ONLY)¶
Note that we do not recommend installing pyNSID this way since branches other than the master branch may contain bugs.
Note
Windows users will need to install git
before proceeding. Please type the following command in the Command Prompt:
conda install git
Install a specific branch of pyNSID (e.g. - dev
in this case):
pip install -U git+https://github.com/pycroscopy/pyNSID@dev
Updating pyNSID¶
We recommend periodically updating your conda / anaconda distribution. Please see these instructions to update anaconda.
If you already have pyNSID installed and want to update to the latest version, use the following command in a terminal window:
If you originally installed pyNSID via
pip
:pip install -U --no-deps pyNSID
If it does not work try reinstalling the package:
pip uninstall pyNSID pip install pyNSID
Other software¶
We recommend HDF View for exploring HDF5 files generated by and used in pyNSID.