forked from gplepage/gvar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALLATION.txt
94 lines (73 loc) · 3.99 KB
/
INSTALLATION.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
To install:
1. If not already installed, download and install the following packages:
a. The numpy python library - provides fast floating-point array
operations in python. Versions earlier than 1.6 may not work.
(http://numpy.scipy.org/)
b. The cython python package - provides a variant of python that
compiles into C code that can itself be compiled and is faster (but
less flexible) than ordinary python. Versions earlier than 0.17
may not work.
(http://www.cython.org/)
c. pip is used for installing (and uninstalling) gvar. pip usually
comes with python. pip can be used to install numpy and cython as
well.
(https://pypi.python.org/pypi/pip)
The gvar code works for Python 2.6 and 2.7, and Python 3.2-3.6. It
does not work for Python versions 2.5.X or earlier. It has not been tested
for Python 3.0 and 3.1, but likely works at least with the latter. Some
of the tests don't work with Python 2.6.
2. Use 'make install'. This will build the gvar packages and
then copy it into a standard directory in the user's space that
Python knows about. A list of the installed files is stored in file
files-gvar.python (in case, for example, you want to uninstall them).
N.B. Rather than using make and the makefile, one can instead use
standard python installation tools like 'pip install . --user'
(from within the main directory) or python distutils commands
like 'python setup.py install --user'.
N.B. If you have previously installed older versions of gvar,
consider removing the earlier package to make sure that the new ones are
used by Python. This will not be a problem if the new package overwrites
the older one, but could cause trouble if the new package is written
to a different place. Find out where the older package is stored by
using 'pydoc gvar' before installing the new software, and make sure
all vestiges of the old gvar are removed (pydoc lists the location of
the module under "FILE", at the end).
N.B. To install gvar with an alternative version of pip, say pip3
for example, use 'make PIP=pip3 install'. Python's standard
directories are structured in such a way that it is necessary to do
a separate installation for each python version that will be used for
gvar.
N.B. If you have old code that uses the gdev module, install gdev.so
using 'make install-gdev' (or 'python gdev-setup.py install --user').
This creates aliases, using the old names, for the critical elements of
the gvar package, thereby allowing most old code to run. Use gvar
instead of gdev for new code.
3. (Optional) Run 'make tests' to test your installation of lsqfit if you
are using Python 2.7 or later (they don't work as well with Python 2.6).
The tests have been successful if the output ends with "OK".
Some tests involve random numbers and so may occasionally --- less than
1 in 100 runs --- fail due to rare multi-sigma fluctuations; rerun the
tests if they do fail. Contact [email protected] if there are
persistent, frequent failures.
N.B. The tests can also be run directly using Python's unittest module:
"python -m unittest discover".
4. (Optional) Use 'make clean' to erase work files/directories.
5. (Optional) Use 'make run-examples' to run the example files in
directory examples/. These are short, annotated examples, suitable
for tinkering.
To uninstall:
1. 'make uninstall' (probably) uninstalls most of what was installed. It
uses pip uninstall.
Problems:
Contact Peter Lepage: [email protected]
# Copyright (c) 2008-2017 G. Peter Lepage.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version (see <http://www.gnu.org/licenses/>).
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.