|
4 | 4 | Installing and Upgrading
|
5 | 5 | ========================
|
6 | 6 |
|
| 7 | +.. contents:: On this page |
| 8 | + :local: |
| 9 | + :backlinks: none |
| 10 | + :depth: 2 |
| 11 | + :class: singlecol |
| 12 | + |
| 13 | +.. facet:: |
| 14 | + :name: genre |
| 15 | + :values: reference |
| 16 | + |
| 17 | +.. meta:: |
| 18 | + :keywords: setup, download, update |
| 19 | + |
7 | 20 | In this guide, you can learn how to install and upgrade {+driver-short+}.
|
8 | 21 |
|
9 | 22 | System Compatibility
|
10 | 23 | --------------------
|
11 | 24 |
|
12 |
| -PyMongoArrow is regularly built and tested on macOS and Linux |
| 25 | +{+driver-short+} is regularly built and tested on macOS and Linux |
13 | 26 | (Ubuntu 20.04).
|
14 | 27 |
|
15 | 28 | Python Compatibility
|
16 | 29 | --------------------
|
17 | 30 |
|
18 |
| -PyMongoArrow is compatible with CPython 3.8, 3.9, 3.10, and 3.11. |
| 31 | +{+driver-short+} is compatible with CPython versions 3.8, 3.9, 3.10, and 3.11. |
19 | 32 |
|
20 | 33 | Installation
|
21 | 34 | ------------
|
22 | 35 |
|
23 |
| -**PyMongoArrow** can be installed in three ways: via Pip, Conda, or Source. |
| 36 | +You can install **{+driver-short+}** in three ways: |
| 37 | + |
| 38 | +- Pip |
| 39 | +- Conda |
| 40 | +- From source |
| 41 | + |
| 42 | +Install with Pip |
| 43 | +~~~~~~~~~~~~~~~~ |
24 | 44 |
|
| 45 | +We recommend using pip to install {+driver-short+} on all platforms. |
| 46 | +{+driver-short+} is available on `PyPI <http://pypi.python.org/pypi/pymongo/>`_. |
25 | 47 |
|
26 |
| -**Using Pip.** We recommend using pip to install pymongoarrow on all platforms. |
27 |
| -PyMongoArrow is available on |
28 |
| -`PyPI <http://pypi.python.org/pypi/pymongo/>`_. |
| 48 | +.. code-block:: sh |
29 | 49 |
|
30 |
| - $ python -m pip install pymongoarrow |
| 50 | + $ python -m pip install pymongoarrow |
31 | 51 |
|
32 |
| -To get a specific version of pymongo:: |
| 52 | +To get a specific version of pymongo: |
33 | 53 |
|
34 |
| - $ python -m pip install pymongoarrow==0.1.1 |
| 54 | +.. code-block:: sh |
35 | 55 |
|
36 |
| -To upgrade using pip:: |
| 56 | + $ python -m pip install pymongoarrow==0.1.1 |
37 | 57 |
|
38 |
| - $ python -m pip install --upgrade pymongoarrow |
| 58 | +To upgrade using pip: |
| 59 | + |
| 60 | +.. code-block:: sh |
| 61 | + |
| 62 | + $ python -m pip install --upgrade pymongoarrow |
39 | 63 |
|
40 | 64 | .. important::
|
41 | 65 |
|
42 |
| - If the install fails due to an error like ``ValueError: Could |
43 |
| - not find "libbson-1.0" library`` it means that ``pip`` failed to find a |
44 |
| - suitable wheel for your platform. We recommend first ensuring you have |
45 |
| - ``pip`` >= 20.3 installed. To upgrade ``pip`` run:: |
| 66 | + If the install fails because of an error, such as ``ValueError: Could |
| 67 | + not find "libbson-1.0" library``, it means that ``pip`` failed to find a |
| 68 | + suitable wheel for your platform. We recommend first ensuring you have |
| 69 | + ``pip`` >= 20.3 installed. To upgrade ``pip``, run the following shell command: |
46 | 70 |
|
47 | 71 | .. code-block:: python
|
48 | 72 |
|
49 | 73 | $ python -m pip install --upgrade pip
|
50 | 74 |
|
51 |
| - You can then attempt to re-install ``pymongoarrow``. |
| 75 | +You can then try to re-install ``pymongoarrow``. |
| 76 | + |
| 77 | +We currently distribute wheels for macOS, Windows, and Linux on x86_64 |
| 78 | +architectures. |
52 | 79 |
|
53 |
| - We currently distribute wheels for macOS, Windows, and Linux on x86_64 |
54 |
| - architectures. |
| 80 | +Install with Conda |
| 81 | +~~~~~~~~~~~~~~~~~~ |
55 | 82 |
|
56 |
| -**Using Conda.** PyMongoArrow is available for ``conda`` users by running:: |
| 83 | +PyMongoArrow is available for ``conda`` users by running the following shell |
| 84 | +command: |
57 | 85 |
|
58 | 86 | .. code-block:: python
|
59 | 87 |
|
60 | 88 | $ conda install --channel conda-forge pymongoarrow
|
61 | 89 |
|
62 |
| -**From Source.** If the above options still do not allow you to install ``pymongoarrow`` on your |
63 |
| -system, you will have to install from source, see :doc:`developer/installation`. |
| 90 | +Install from Source |
| 91 | +~~~~~~~~~~~~~~~~~~~ |
64 | 92 |
|
| 93 | +If the above options still do not allow you to install ``pymongoarrow`` on your |
| 94 | +system, you can install from source. To learn how, see the `Developer Guide |
| 95 | +<https://mongo-arrow.readthedocs.io/en/{+patch-version-number+}/developer/installation.html>`__. |
65 | 96 |
|
66 | 97 | Dependencies
|
67 | 98 | ^^^^^^^^^^^^
|
68 | 99 |
|
69 |
| -PyMongoArrow requires: |
| 100 | +{+driver-short+} requires the following: |
70 | 101 |
|
71 | 102 | - PyMongo>=4.4
|
72 | 103 | - PyArrow>=13,<13.1
|
73 | 104 |
|
74 |
| -To use PyMongoArrow with a PyMongo feature that requires an optional |
75 |
| -dependency, users must install PyMongo with the given dependency manually. |
| 105 | +To use {+driver-short+} with a PyMongo feature that requires an optional |
| 106 | +dependency, users must install PyMongo with the dependency manually. |
76 | 107 |
|
77 | 108 | .. note::
|
78 | 109 |
|
79 | 110 | PyMongo's optional dependencies are detailed
|
80 |
| - `here <https://pymongo.readthedocs.io/en/stable/installation.html#dependencies>`_. |
| 111 | + `here <https://pymongo.readthedocs.io/en/stable/installation.html#dependencies>`__. |
| 112 | + |
| 113 | +For example, to use {+driver-short+} with Client-Side Field Level Encryption, |
| 114 | +you must install PyMongo with the ``encryption`` option in addition to installing |
| 115 | +{+driver-short+}: |
| 116 | + |
| 117 | +.. code-block:: sh |
81 | 118 |
|
82 |
| -For example, to use PyMongoArrow with Client-Side Field Level Encryption |
83 |
| -users must install PyMongo with the ``encryption`` extra in addition to installing |
84 |
| -PyMongoArrow:: |
| 119 | + $ python -m pip install 'pymongo[encryption]' pymongoarrow |
85 | 120 |
|
86 |
| - $ python -m pip install 'pymongo[encryption]' pymongoarrow |
| 121 | +Applications intending to use {+driver-short+} APIs that return query result-sets |
| 122 | +as ``pandas.DataFrame`` instances, such as ``~pymongoarrow.api.find_pandas_all()``, |
| 123 | +must also have ``pandas`` installed: |
87 | 124 |
|
88 |
| -Applications intending to use PyMongoArrow APIs that return query result sets |
89 |
| -as :class:`pandas.DataFrame` instances (e.g. :meth:`~pymongoarrow.api.find_pandas_all`) |
90 |
| -must also have ``pandas`` installed:: |
| 125 | +.. code-block:: sh |
91 | 126 |
|
92 |
| - $ python -m pip install pandas |
| 127 | + $ python -m pip install pandas |
0 commit comments