Installing from source

1.2 Installing from source

After obtaining and installing the previously outlined requirements, a tar ball of NanoCap can be downloaded from:

http://sourceforge.net/projects/nanocap/files/src/

As an alternative, the latest release can be checked out from the mercurial repository:

bash-3.2$ hg clone http://hg.code.sf.net/p/nanocap/code-0 nanocap-code-0

After downloading and unpacking (if required), installation proceeds in the typically python fashion:

bash-3.2$ python setup.py install

The installation runs a configure script (generated by autoconf) that detects available C and Fortran compilers and builds the associated shared libraries. To test for a successful installation, simply attempt to import NanoCap in a python terminal.

bash-3.2$ python
Python 2.7.3 (default, Jul 19 2012, 13:57:53) 
[GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.61)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import nanocap
>>> print nanocap.__version__
1.0b9

The successful import and printing of the version number indicates the libraries installed correctly. To test the installation further, try running the example scripts shown in Section 10.

If the GUI and rendering libraries have been successfully installed then NanoCapcan be ran either as an application or as libraries. To run the GUI enabled NanoCap simply type:

bash-3.2$ nanocap

into the command prompt.