|
4 | 4 |
|
5 | 5 | ### The easy way
|
6 | 6 |
|
7 |
| -The easiest way to install AnyPyTools on Windows (along with all dependencies) is through the Anaconda Python |
8 |
| -Distribution and the conda package manager. |
| 7 | +The esiest way to get started is using the pixi package manager. It will |
| 8 | +automatically install python and all needed depencies for you. |
9 | 9 |
|
10 |
| -Install AnyPyTools with the following command: |
11 | 10 |
|
12 |
| -```bat |
13 |
| -> conda config --add channels conda-forge |
14 |
| -> conda install anypytools |
| 11 | +Install the [pixi](https://pixi.sh/) package manager for Python. |
| 12 | + |
| 13 | +```bash |
| 14 | +powershell -ExecutionPolicy ByPass -c "irm -useb https://pixi.sh/install.ps1 | ie |
15 | 15 | ```
|
16 | 16 |
|
17 |
| -This will install `anypytools` and all the recommended dependencies. Next, try to launch the |
18 |
| -interactive AnyPyTools notebook tutorial : |
| 17 | +After installation, open your working directory for you project in the terminal |
| 18 | +and run the following command: |
19 | 19 |
|
20 |
| -```bat |
21 |
| -> AnyPyToolsTutorial.bat |
| 20 | +```bash |
| 21 | +pixi init |
| 22 | +pixi add anypytools |
| 23 | +pixi install |
22 | 24 | ```
|
23 | 25 |
|
24 |
| -### Other installations options |
| 26 | +This will create a virtual python environment in that folder and install the |
| 27 | +AnyPyTools package. Likwise, you can add other depedencies to the virtual |
| 28 | +environment (e.g. `pixi add jupyter pandas`). All dependencies are tracked in |
| 29 | +the `pixi.yaml` file which can also be edited manually. |
| 30 | +
|
| 31 | +You can now activate the virtual environment with `pixi shell` and run your |
| 32 | +scripts. Otherwise, you can prefix your commands with `pixi run` to run them in |
| 33 | +the virtual environment, e.g. `pixi run python myscript.py`. |
| 34 | +
|
| 35 | +
|
| 36 | +### Controling the version of AnyBody used by AnyPyTools |
25 | 37 |
|
26 |
| -It is also possible to install directly from the python package index. |
| 38 | +The clever part of using a package manger like pixi is that you can also control |
| 39 | +which version of the AnyBody is used by AnyPyTools. |
27 | 40 |
|
28 |
| -```bat |
29 |
| -> pip install AnyPyTools |
| 41 | +A light gui-less version of AnyBody exists as |
| 42 | +[conda-packages](https://anaconda.org/anybody/anybodycon). Hence, we can install |
| 43 | +a specific version of AnyBody into our virtual environment. |
| 44 | +
|
| 45 | +To do this we first need to add the `anybody` channel to our project. |
| 46 | +
|
| 47 | +```bash |
| 48 | +pixi project channel add anybody` |
30 | 49 | ```
|
31 | 50 |
|
32 |
| -or clone/download the source files from [GitHub](https://github.com/AnyBody-Research-Group/AnyPyTools), and then run the following command in the source folder to install: |
| 51 | +Then we can install a specific version of AnyBody console application. |
33 | 52 |
|
34 |
| -```bat |
35 |
| -> pip install -e . |
| 53 | +```bash |
| 54 | +pixi add anybodycon=8.0.4 |
36 | 55 | ```
|
| 56 | +
|
| 57 | +Now all simulations executed with AnyPyTools in this project will use the |
| 58 | +specified version of AnyBody, regardsless of what is installed on the host |
| 59 | +system. |
| 60 | +
|
| 61 | +:::{note} |
| 62 | +You still need valid AnyBody license to run the simulations with the AnyBody Conda packages. |
| 63 | +::: |
0 commit comments