|
4 | 4 | [](https://github.com/yafshar/xsum/actions)
|
5 | 5 | [](https://ci.appveyor.com/project/yafshar/xsum/branch/master)
|
6 | 6 | [](https://pypi.python.org/pypi/xsum)
|
| 7 | +[](https://anaconda.org/conda-forge/xsum) |
7 | 8 | [](LICENSE)
|
8 | 9 |
|
9 | 10 | In applications like optimization or finding the sample mean of data, it is
|
@@ -484,32 +485,82 @@ Rank = 0, sum = 0.95600000000000007194, sum 1 = 0.95599999999998419575, sum
|
484 | 485 | ### Python
|
485 | 486 |
|
486 | 487 | The provided Python bindings provide the *exact summation* interface in a
|
487 |
| -Python code. You need Python 3.6 or later to run `xsum`. You can have multiple |
488 |
| -Python versions (2.x and 3.x) installed on the same system without problems. |
| 488 | +Python code. |
| 489 | + |
| 490 | +### Python requirements |
| 491 | + |
| 492 | +You need Python 3.6 or later to run `xsum`. You can have multiple Python |
| 493 | +versions (2.x and 3.x) installed on the same system without problems. |
489 | 494 |
|
490 | 495 | To install Python 3 for different Linux flavors, macOS and Windows, packages
|
491 | 496 | are available at\
|
492 | 497 | [https://www.python.org/getit/](https://www.python.org/getit/)
|
493 | 498 |
|
| 499 | +### Using pip |
| 500 | + |
494 | 501 | **pip** is the most popular tool for installing Python packages, and the one
|
495 |
| -included with modern versions of Python. `pip` currently supports cloning over |
496 |
| -`git`. |
| 502 | +included with modern versions of Python. |
497 | 503 |
|
498 | 504 | `xsum` can be installed with `pip`:
|
499 | 505 |
|
500 | 506 | ```sh
|
501 |
| -pip install git+https://github.com/yafshar/xsum.git |
| 507 | +pip install xsum |
502 | 508 | ```
|
503 | 509 |
|
504 | 510 | **Note:**
|
505 | 511 |
|
506 | 512 | Depending on your Python installation, you may need to use `pip3` instead of
|
507 |
| -`pip`, or you may have to run `pip` like this: |
| 513 | +`pip`. |
| 514 | + |
| 515 | +```sh |
| 516 | +pip3 install xsum |
| 517 | +``` |
| 518 | + |
| 519 | +Depending on your configuration, you may have to run `pip` like this: |
| 520 | + |
| 521 | +```sh |
| 522 | +python3 -m pip install xsum |
| 523 | +``` |
| 524 | + |
| 525 | +### Using pip (GIT Support) |
| 526 | + |
| 527 | +`pip` currently supports cloning over `git` |
| 528 | + |
| 529 | +```sh |
| 530 | +pip install git+https://github.com/yafshar/xsum.git |
| 531 | +``` |
| 532 | + |
| 533 | +For more information and examples, see the |
| 534 | +[pip install](https://pip.pypa.io/en/stable/reference/pip_install/#id18) |
| 535 | +reference. |
| 536 | + |
| 537 | +### Using conda |
| 538 | + |
| 539 | +**conda** is the package management tool for Anaconda Python installations. |
| 540 | + |
| 541 | +Installing `xsum` from the `conda-forge` channel can be achieved by |
| 542 | +adding `conda-forge` to your channels with: |
508 | 543 |
|
509 | 544 | ```sh
|
510 |
| -python3 -m pip install git+https://github.com/yafshar/xsum.git |
| 545 | +conda config --add channels conda-forge |
511 | 546 | ```
|
512 | 547 |
|
| 548 | +Once the `conda-forge` channel has been enabled, `xsum` can be |
| 549 | +installed with: |
| 550 | + |
| 551 | +```sh |
| 552 | +conda install xsum |
| 553 | +``` |
| 554 | + |
| 555 | +It is possible to list all of the versions of `xsum` available on your platform |
| 556 | +with: |
| 557 | + |
| 558 | +```sh |
| 559 | +conda search xsum --channel conda-forge |
| 560 | +``` |
| 561 | + |
| 562 | +### Python examples |
| 563 | + |
513 | 564 | ```py
|
514 | 565 | from xsum import *
|
515 | 566 | import numpy as np
|
|
0 commit comments