Installation

Installation From Release

pyNastran is an easy package to install once you have the required Python modules. It’s a pure Python package so you shouldn’t have too many problems. Just type:

pip install pyNastran

Python

The software is tested against:
  • Python 3.7 (Windows/Linux)

  • Python 3.8 (Windows/Linux)

Packages

pyNastran is tested against a range of package versions (lowest to highest based on availbility), so should work. The recommended set of packages are:

  • Required:

    • numpy >= 1.14

    • scipy >= 1.0

    • cpylog >= 1.4.0

    • docopt-ng == 0.7.2 (required for command line tools)

  • Optional:

    • colorama >= 0.3.9 (colored logging)

    • pandas ???

    • matplotlib >= 2.2.4 (plotting)

    • h5py >= 2.8.0 (HDF5 support)

  • GUI:

    • vtk 7.1.1 or 8.1.1

    • qtpy >= 1.4.0

    • Qt (pick one)

      • PyQt5 >= 5.9.2

      • PySide2 >= 5.11.2

    • QScintilla >= ??? (optional for fancy scripting)

    • pygments >= 2.2.0 (optional for fancy scripting)

    • imageio >= 2.4.1 (optional for animation support)

Use Web docs

See docs

Installation From Source

pyNastran is an easy package to install once you have the required Python modules. It’s a pure Python package so you shouldn’t have too many problems.

Installing from source is recommened if:
  • You want the most recent version (see installation.rst-master)

  • You want easier access to the source

  • You’re on an air-gapped machine

  • Install Python (see installation_release)

    • skip the pip install pyNastran step

  • Install Sphinx, GraphViz, alabaster (for documentation)

  • Install Git

  • Clone pyNastran-master from Github

  • Install pyNastran

Install GraphViz

Install additional python packages

pip install Sphinx
pip install alabaster
pip install numpydoc
  • Download & install Git

  • Download a GUI for Git (optional)

There are two ways to install the 1.2 (master/dev) version of pyNastran

  1. Download the most recent zip version

  2. Clone pyNastran (see below). Using Git allows you to easily update to the latest dev version when you want to as well as push any commits of your own.

If you don’t want the gui, use setup_no_gui.py instead of setup.py.

>>> python setup.py install

or:

>>> python setup_no_gui.py install

Right-click in a folder and select Git Clone.

installation/clone.png

Enter the above information. If desired, click the branch box and and enter a branch name and click OK.

Checkout/clone the dev code by typing (preferred):

>>> git clone https://github.com/SteveDoyle2/pynastran

To checkout a branch

>>> git.exe clone --branch 1.3 --progress -v "https://github.com/SteveDoyle2/pyNastran.git" "C:\\work\\pyNastran_1.3"

Two options for documentation exist.

Build Docs

Navigate to pyNastran/docs_sphinx directory on the command line.

>>> make html