Skip to content

Commit a1187be

Browse files
PYTHON-2668 Improve README installation instructions and add FAQ (#34)
1 parent cb4768a commit a1187be

File tree

4 files changed

+40
-5
lines changed

4 files changed

+40
-5
lines changed

bindings/python/README.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,23 @@ suited for in-memory analytical processing applications.
4242

4343
Installing PyMongoArrow
4444
=======================
45-
PyMongoArrow is available on PyPI:::
45+
PyMongoArrow is available on PyPI::
4646

4747
$ python -m pip install pymongoarrow
4848

49-
PyMongoArrow wheels are available for macOS and Linux on x86_64 architectures.
49+
To use PyMongoArrow with MongoDB Atlas' ``mongodb+srv://`` URIs, you will
50+
need to also install PyMongo with the ``srv`` extra::
51+
52+
$ python -m pip install 'pymongo[srv]<4' pymongoarrow
53+
54+
To use PyMongoArrow APIs that return query result sets as pandas
55+
DataFrame instances, you will also need to have the ``pandas`` package
56+
installed::
57+
58+
$ python -m pip install pandas
59+
60+
Currently, PyMongoArrow wheels are only available for macOS and Linux
61+
on x86_64 architectures.
5062

5163
Documentation
5264
=============

bindings/python/docs/source/faq.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Frequently Asked Questions
2+
==========================
3+
4+
.. contents::
5+
6+
Why do I get ``ModuleNotFoundError: No module named 'pandas'`` when using PyMongoArrow
7+
--------------------------------------------------------------------------------------
8+
9+
This error is raised when an application attempts to use a PyMongoArrow API
10+
that returns query result sets as a :class:`pandas.DataFrame` instance without
11+
having ``pandas`` installed in the Python environment. Since ``pandas`` is not
12+
a direct dependency of PyMongoArrow, it is not automatically installed when
13+
you install ``pymongoarrow`` and must be installed separately::
14+
15+
$ python -m pip install pandas

bindings/python/docs/source/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ know to use **PyMongoArrow**.
2121
:doc:`supported_types`
2222
A list of BSON types that are supported by PyMongoArrow.
2323

24+
:doc:`faq`
25+
Frequently asked questions.
26+
2427
:doc:`api/index`
2528
The complete API documentation, organized by module.
2629

bindings/python/docs/source/installation.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ on all platforms::
2424

2525
To get a specific version of pymongo::
2626

27-
$ python -m pip install pymongoarrow==0.1.0
27+
$ python -m pip install pymongoarrow==0.1.1
2828

2929
To upgrade using pip::
3030

@@ -58,8 +58,13 @@ For example, to use PyMongoArrow with MongoDB Atlas' ``mongodb+srv://`` URIs
5858
users must install PyMongo with the ``srv`` extra in addition to installing
5959
PyMongoArrow::
6060

61-
$ python -m pip install pymongoarrow
62-
$ python -m pip install pymongo[srv]>=3.11,<4
61+
$ python -m pip install 'pymongo[srv]<4' pymongoarrow
62+
63+
Applications intending to use PyMongoArrow APIs that return query result sets
64+
as :class:`pandas.DataFrame` instances (e.g. :meth:`~pymongoarrow.api.find_pandas_all`)
65+
must also have ``pandas`` installed::
66+
67+
$ python -m pip install pandas
6368

6469
Installing from source
6570
----------------------

0 commit comments

Comments
 (0)