| 1 |
# Installation |
| 2 |
|
| 3 |
`autoray` is available on both [pypi](https://pypi.org/project/autoray/) and |
| 4 |
[conda-forge](https://anaconda.org/conda-forge/autoray). While `autoray` is |
| 5 |
pure python and has no direct dependencies itself, the recommended distribution |
| 6 |
would be [mambaforge](https://github.com/conda-forge/miniforge#mambaforge) |
| 7 |
for installing the various backend array libraries and their dependencies. |
| 8 |
|
| 9 |
**Installing with `pip`:** |
| 10 |
```bash |
| 11 |
pip install autoray |
| 12 |
``` |
| 13 |
|
| 14 |
**Installing with `conda`:** |
| 15 |
```bash |
| 16 |
conda install -c conda-forge autoray |
| 17 |
``` |
| 18 |
|
| 19 |
**Installing with `mambaforge`:** |
| 20 |
```bash |
| 21 |
mamba install autoray |
| 22 |
``` |
| 23 |
```{hint} |
| 24 |
Mamba is a faster version of `conda`, and the -forge distritbution comes |
| 25 |
pre-configured with only the `conda-forge` channel, which further simplifies |
| 26 |
and speeds up installing dependencies. |
| 27 |
``` |
| 28 |
|
| 29 |
**Installing the latest version directly from github:** |
| 30 |
|
| 31 |
If you want to checkout the latest version of features and fixes, you can |
| 32 |
install directly from the github repository: |
| 33 |
```bash |
| 34 |
pip install -U git+https://github.com/jcmgray/autoray.git |
| 35 |
``` |
| 36 |
|
| 37 |
**Installing a local, editable development version:** |
| 38 |
|
| 39 |
If you want to make changes to the source code and test them out, you can |
| 40 |
install a local editable version of the package: |
| 41 |
```bash |
| 42 |
git clone https://github.com/jcmgray/autoray.git |
| 43 |
pip install --no-deps -U -e autoray/ |
| 44 |
``` |
| 45 |
|
| 46 |
```{note} |
| 47 |
**No-install version:** |
| 48 |
The entirety of the automatic dispatch mechanism is contained in the single |
| 49 |
file `autoray.py`, which you could simply copy into your project if you don't |
| 50 |
want add a dependency. |
| 51 |
``` |
| 52 |
|
| 53 |
## Optional plotting requirements |
| 54 |
|
| 55 |
The [`autoray.lazy.draw`](autoray.lazy.draw) visualizations variously require: |
| 56 |
|
| 57 |
* [`matplotlib`](https://matplotlib.org/) |
| 58 |
* [`networkx`](https://networkx.org/) - for computational graph drawing |
| 59 |
* [`pygraphviz`](https://pygraphviz.github.io/) - optional, for better and |
| 60 |
faster graph layouts than `networkx`. |