forked from zlorb/PyModel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.txt
74 lines (54 loc) · 3.05 KB
/
INSTALL.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
To use PyModel, you do not need to install anything into any system
directories. Just obtain the PyModel directory and place it under
your home directory. To get the current development version,
git clone [email protected]:jon-jacky/PyModel.git
To get version 1.0, download PyModel-1.0.tar.gz or PyModel-1.0.zip
from
https://pypi.python.org/pypi/PyModel
or
http://staff.washington.edu/jon/pymodel/www/
Then unpack it using a tar or zip utility.
Alternatively, if you have pip installed you can download
PyModel-1.0.tar.gz from PyPI into the current directory, and then
unpack it, with a single command:
pip install --no-install --build . PyModel
Be sure to use the " --no-install -build . " options.
Then you can run PyModel using the commands and modules in the
unpacked distribution directory. Just put PyModel/bin on your
execution PATH and PyModel/pymodel on your PYTHONPATH. You can
achieve this by executing the script PyModel/bin/pymodel_paths. That
script assumes the distribution directory is in your HOME directory
and is named PyModel (not PyModel-1.0, so you many need to rename it).
On Windows, pymodel_paths_mydocs.bat assumes the unpacked PyModel
directory is under your My Documents directory (as is common in
Windows XP), while pymodel_paths.bat assumes it is under your home
directory (which might be more common in Windows 7).
Confirm that PyModel works for you by running some of the test scripts
in the samples directories. For example, in
PyModel/samples/PowerSwitch, type the command: trun test (not python
test.py). You should then see output from several runs of the pmt
program as it executes the PowerSwitch model.
The setup.py script included in the distribution now supports the
install argument, so you can optionally install the PyModel python
modules and commands in system directories (for example, on Mac OS X:
/Library/Python/2.7/site-packages and /usr/local/bin, respectively;
on Windows: C:\Python27\Lib\site-packages and C:\Python27\Scripts).
In the PyModel directory, type the command:
sudo python setup.py install
Alternatively, if you have pip installed you can type the command:
sudo pip install --no-download --build . PyModel
The pip utility maintains a registry of the packages it has installed,
which makes it easy to review and uninstall packages.
After installing you should not need to execute pymodel_paths, but you
may still need to type the command: source tpath in every session
(terminal window). After installing on Windows you may still need to
set paths, pymodel_paths_installed.bat might be a useful example.
Most of the distribution contents is in the examples under
PyModel/samples, and in the documentation under PyModel/notes, www,
and talks, and in the README files in most directories. Installation
does not install these into any system directories; find them under
the unpacked PyModel distribution directory. This is why we
recommend the pip --noinstall and --build switches. The pip install
command without these switches will not leave the unpacked
distribution files available on your system.
Revised May 2013