| 1 |
============ |
| 2 |
Installation |
| 3 |
============ |
| 4 |
|
| 5 |
This file describes the installation of SimPy |release|. |
| 6 |
|
| 7 |
#. Check that you have Python 2.3 or above. Python 3 is not yet supported, but |
| 8 |
we are working on it. If necessary, download Python from http://python.org |
| 9 |
and install it. |
| 10 |
|
| 11 |
#. You can install SimPy easily via `PIP <http://pypi.python.org/pypi/pip>`_ |
| 12 |
(or ``easy_install``):: |
| 13 |
|
| 14 |
$ pip install SimPy |
| 15 |
$ # or: |
| 16 |
$ easy_install SimPy |
| 17 |
|
| 18 |
If SimPy is already installed, use the *-U* option for pip/easy_install to |
| 19 |
upgrade:: |
| 20 |
|
| 21 |
$ pip install -U SimPy |
| 22 |
|
| 23 |
Remember, on Linux/MacOS/Unix you may need *root* privileges to install |
| 24 |
SimPy. This also applies to the installing SimPy manually as described |
| 25 |
below. |
| 26 |
|
| 27 |
#. To manually install a SimPy tarball, or to execute the examples, download |
| 28 |
and unpack the SimPy archive into a folder (using option "Use folder names" |
| 29 |
in WinZip, "Re-create folders" in Linux Archive Manager, or similar option |
| 30 |
in your unpacker). This will create a SimPy-|release| folder with all source |
| 31 |
code and documentation. |
| 32 |
|
| 33 |
Open a terminal, *cd* to the SimPy folder and execute *setup.py* or |
| 34 |
*easy_install .* or *pip install .*:: |
| 35 |
|
| 36 |
$ cd where/you/put/simpy/SimPy-x.y |
| 37 |
$ python setup.py install |
| 38 |
$ # or |
| 39 |
$ easy_install . |
| 40 |
$ # or |
| 41 |
$ pip install . |
| 42 |
|
| 43 |
If you do not have permissions to perform the installation as root, you can |
| 44 |
install SimPy into a non-standard folder:: |
| 45 |
|
| 46 |
$ cd where/you/put/simpy/SimPy-x.y |
| 47 |
$ python setup.py install --home <dir> |
| 48 |
|
| 49 |
#. Run one or more of the programs under *docs/examples* to see |
| 50 |
whether Python finds the SimPy module. If you get an error message |
| 51 |
like *ImportError: No module named SimPy*, move the SimPy folder |
| 52 |
into a directory which you know to be on the Python module search |
| 53 |
path (like /Lib/site-packages). |
| 54 |
|
| 55 |
#. The tutorial and manuals are in the *docs/html* folder. Many users have |
| 56 |
commented that the Bank tutorials are valuable in getting users started on |
| 57 |
building their own simple models. Even a few lines of Python and SimPy can |
| 58 |
model significant real systems. |
| 59 |
|
| 60 |
For more help, contact the `SimPy-Users mailing list |
| 61 |
<mailto:[email protected]>`_. SimPy users are pretty helpful. |
| 62 |
|
| 63 |
|
| 64 |
Enjoy simulation programming in SimPy! |