Installation¶
Instructions¶
The recommended way¶
The recommended way to install VDAT is using pip:
pip install --extra-index-url https://gate.mpe.mpg.de/pypi/simple/ vdat
It’s possible to set the extra index URL permanently by adding the following lines
to the $HOME/.pip/pip.conf
file:
[global]
extra-index-url = https://gate.mpe.mpg.de/pypi/simple
or exporting the environment variable:
export PIP_EXTRA_INDEX_URL=https://gate.mpe.mpg.de/pypi/simple
The list of released versions can be seen on the MPE pypi server. A specific version can be
installed using specifiers,
e.g. issuing pip install vdat==0.4
.
pip
will take care of installing all the VDAT dependances, except for the Qt
bindings. Instructions about the Qt
binding and how to install them can be found in Qt bindings. Also, if you want
to run commands in VDAT you will also need to install Cure.
If the pyds9
package, VDAT will be able to send fits files to DS9. See
pyds9 for instructions on how to install the package
We suggest you install VDAT into a virtualenv, in an anaconda/conda or in similar environments.
Of course it is also possible to install VDAT without any of the above with:
pip install --user --extra-index-url https://gate.mpe.mpg.de/pypi/simple/ vdat
This way the VDAT executables are installed in $HOME/.local/bin
, so make sure to add
this to the environment variable PATH
to be able to easily use them on the command line. The use
of sudo
when installing with pip is discouraged
and potentially harmful.
From the online svn repository¶
These steps are to be followed if you want to install the latest version.
First get a local copy of VDAT
, you can checkout the repository with:
svn checkout svn://luna.mpe.mpg.de/vdat/trunk vdat
Similarly you can check out any branch. Now you can install with:
pip install /path/to/vdat
or:
cd /path/to/vdat
pip install .
It’s also possible to install vdat directly from the svn repository without checking it out:
pip install svn+svn://luna.mpe.mpg.de/vdat/trunk#egg=vdat
If necessary replace trunk
with the desired tag or branch to checkout and
install.
Dependances¶
Mandatory dependences¶
pyhetdex>=0.12
astropy
colorama
numpy
six
peewee
ginga
pyyaml
qimage2ndarray>=1.5.1
qtpy >= 1.1
Qt
bindings¶
Starting with version 0.9.0, VDAT makes use of the qtpy abstraction layer to communicate with
the Qt instead of using directly some of the available
python bindings. This allows the user to decide which version of Qt
to use
and which binding you use. qtpy
automatically detects which Qt
binding
to use and defaults to PyQt5
if multiple are present. It is possible to
select a specific binding using the QT_API
environment variable; see here for more details.
Available bindings and current status:
PyQt4,
Qt4
bindings: fully supported. UnfortunatelyPyQt4
cannot be installed using pip; also SIP library one of his dependences, cannot be installed with pip for python < 3.5. To our knowledge it is possible to obtainPyQt4
in one of the following ways:- If you feel brave you can try to install them by hand following e.g. these instructions
- use a package manager; most, if not all, Linux distributions, as well as
Mac packet managers like
homebrew
andmacports
, providePyQt4
- use tools like the anaconda distribution or the conda package manager
PyQt5,
Qt5
bindings: fully supported.PyQt5
provides wheels for 32- and 64-bit Windows, 64-bit macOS and 64-bit Linux under python v3.5 or later. Thus it is possible to installQt5
bindings using:pip install pyqt5
PyQt5
is also available inanaconda
/conda
PySide,
Qt4
bindings: not supported. We were not able to run unit test forPySide
because of problems with the underlying C/C++ library (see issue #2607). Attempts to run VDAT directly withPySide
cause errors (issue #2598 and issue #2606).PySide
can be installed usingpip
(see A note on PySide if there are problems).PySide2,
Qt5
bindings: not supported. It is not yet supported by some dependences (issue #2597).PySide2
can be installed using pip:pip install --index-url=http://download.qt.io/snapshots/ci/pyside/5.11/latest/ pyside2 --trusted-host download.qt.io
Optional dependences¶
pyds9
¶
pyds9
allows to communicate between python and DS9 and is use to send fits
and region files from VDAT to DS9. If the package is not installed, VDAT works.
You can install pyds9
together with the rest of VDAT with:
pip install vdat[ds9]
or alone with:
pip install pyds9
ltl
and cure
¶
cure
is a C++ code that provides utilities that are executed in subprocesses
by most of the VDAT commands and depends on ltl
.
However VDAT doesn’t depend on cure
.
Detailed information on how to install ltl
and cure
can be found here.
Here we report the basic steps for completeness.
Check out and compile ltl
:
cd /path/to/project
svn checkout svn://luna.mpe.mpg.de/ltl/trunk ltl
cd ltl
./bootstrap
./configure
make
cd ..
Check out and compile cure
:
svn checkout svn://luna.mpe.mpg.de/cure/trunk cure
cd cure
make install
This will install the binaries into bin
directory. If you don’t have OpenGL
libraries installed, run:
make install HAVE_OPENGL=no
as last step. You can use make -j N
to speed up the build process using N
cores.
After it is installed, you might want to:
export CUREBIN=/path/to/project/cure/bin
Python dependences¶
testing:
pytest>=3.3 pytest-qt>=2.0 pytest-cov pytest-xdist coverage tox # for automatizing the tests
documentation:
sphinx numpydoc alabaster pyhetdex
automatic documentation build:
sphinx-autobuild => 0.5.2
Development¶
If you develop pyhetdex
and/or vdat
we suggest you checkout both svn
repositories and install them in “editable” mode
. We also recommend installing all of the optional dependances:
cd /path/to/vdat
pip install -e .
It is possible to also install the pyhetdex
software in editable mode adding
-e
in the requirements.txt
file before the url or path, e.g.:
~> cat requirements.txt
-e /path/to/pyhetdex
and adding the options -r requirements.txt
in the pip
call.
See Contribute to VDAT for more information.
Notes and problems¶
It is possible to change the version to install from svn by selecting a specific commit:
pip install svn+svn://luna.mpe.mpg.de/vdat/trunk@5#egg=vhc
or a different branch/tag:
pip install svn+svn://luna.mpe.mpg.de/vdat/tag/v0.0.0#egg=vhc
If the installation gets interrupted with an error like:
ImportError: No module named 'numpy'
run
pip install numpy
and then retryvdat
installation