/
installation.txt
126 lines (81 loc) · 3.48 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
Installation
============
If you don't need source, the simplest way to install the TDDA library is
to do a normal ``pip`` install::
pip install tdda
If you have multiple Python installations and want to ensure you use the
right one, use::
python -m pip install tdda
replacing ``python`` with whatever you need to use to run your target
version of Python.
If you want it installed for all users and don't have write access to
your Python's site packages, you should change the permissions
so that you can write it, or log in as a user who does have permission,
or add ``sudo`` before the ``pip`` or ``python`` command.
Upgrading
---------
Add ``--upgrade`` or ``-U`` after ``install`` in the commands above
to upgrade an existing installation.
This is a general pattern for ``pip``::
pip install -U tdda
or::
python -m pip install -U tdda
Source installation
-------------------
The `tdda <https://github.com/tdda/tdda>`_ project is hosted on Github at
`github.com/tdda/tdda <https://github.com/tdda/tdda>`_.
If you want to do a source installation, that's probably all you need to know,
but::
git clone git@github.com:tdda/tdda.git
or::
git clone https://github.com/tdda/tdda.git
is the command to get it.
Then::
python setup.py install
should install it.
Checking the installation
-------------------------
If all has gone well, you should be able to type::
tdda
and it will show you some help.
You should also be able to use::
>>> import tdda
>>> tdda.__version__
from your Python successfully.
Finally, you should be able to run the tests with no failures, like this
for example::
cd tdda/tdda
python testtdda.py
Skipping Postgres tests (no driver library)
Skipping MySQL tests (no driver library)
......................................................................................................ssssssssss..................................................................sssss..............................
----------------------------------------------------------------------
Ran 213 tests in 18.421s
OK (skipped=15)
Some tests will be skipped (``s``) if you don't have various libraries
or haven't (yet) told TDDA about any databases you might want to use.
.. _optional_installations:
Optional Installations for using Databases, Feather Files, Pandas
-----------------------------------------------------------------
Extra libraries are required to access some of the constraint-generation
and verification functionality, depending on the data sources that you
wish to use.
* :py:mod:`pandas` (required for CSV files and :py:mod:`feather` files)
* :py:mod:`feather-format` (required for :py:mod:`feather` files)
* :py:mod:`pmmif` (makes :py:mod:`feather` file reading and writing more robust)
* :py:mod:`pygresql` (required for PostgreSQL database tables)
* :py:mod:`MySQL-python` or :py:mod:`mysqlclient` or :py:mod:`mysql-connector-python` (required for MySQL database tables)
* :py:mod:`pymongo` (required for MongoDB document collections)
These can be installed with (some/all of)::
pip install pandas
pip install feather-format
pip install pmmif
pip install pygresql
pip install pymongo
and, for MySQL, **one** of::
pip install MySQL-python
pip install mysqlclient
pip install mysql-connector-python
To install :py:mod:`feather-format` on Windows, you will need to install
:py:mod:`cython` as a prerequisite, which might also require you to install
the Microsoft Visual C++ compiler for Python.