zsh doesn't parse the square brackets as expected.
See #347.
Quick version::
pip install --upgrade pip # upgrade pip to at least 20.3
- pip install psycopg[binary,pool] # install binary dependencies
+ pip install "psycopg[binary,pool]" # install binary dependencies
For further information about installation please check `the documentation`__.
python -m venv .venv
source .venv/bin/activate
- pip install -e ./psycopg[dev,test] # for the base Python package
+ pip install -e "./psycopg[dev,test]" # for the base Python package
pip install -e ./psycopg_c # for the C extension module
pip install -e ./psycopg_pool # for the connection pool
.venv:
$(PYTHON) -m venv .venv
- ./.venv/bin/pip install -e ../psycopg[docs] -e ../psycopg_pool
+ ./.venv/bin/pip install -e "../psycopg[docs]" -e ../psycopg_pool
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
the pool operations.
.. note:: The connection pool objects are distributed in a package separate
- from the main `psycopg` package: use ``pip install psycopg[pool]`` or ``pip
+ from the main `psycopg` package: use ``pip install "psycopg[pool]"`` or ``pip
install psycopg_pool`` to make the `psycopg_pool` package available. See
:ref:`pool-installation`.
`!AsyncConnectionPool`.
.. note:: The `!psycopg_pool` package is distributed separately from the main
- `psycopg` package: use ``pip install psycopg[pool]``, or ``pip install
+ `psycopg` package: use ``pip install "psycopg[pool]"``, or ``pip install
psycopg_pool``, to make it available. See :ref:`pool-installation`.
The version numbers indicated in this page refer to the `!psycopg_pool`
in Cython_). It is much better performing than the ``python``
implementation, however it requires development packages installed on the
client machine. It can be installed using the ``c`` extra, i.e. running
- ``pip install psycopg[c]``.
+ ``pip install "psycopg[c]"``.
- ``binary``: a pre-compiled C implementation, bundled with all the required
libraries. It is the easiest option to deal with, fast to install and it
should require no development tool or client library, however it may be not
available for every platform. You can install it using the ``binary`` extra,
- i.e. running ``pip install psycopg[binary]``.
+ i.e. running ``pip install "psycopg[binary]"``.
.. _Cython: https://cython.org/
In short, if you use a :ref:`supported system<supported-systems>`::
pip install --upgrade pip # upgrade pip to at least 20.3
- pip install psycopg[binary]
+ pip install "psycopg[binary]"
and you should be :ref:`ready to start <module-usage>`. Read further for
alternative ways to install.
The quickest way to start developing with Psycopg 3 is to install the binary
packages by running::
- pip install psycopg[binary]
+ pip install "psycopg[binary]"
This will install a self-contained package with all the libraries needed.
**You will need pip 20.3 at least**: please run ``pip install --upgrade pip``
If your build prerequisites are in place you can run::
- pip install psycopg[c]
+ pip install "psycopg[c]"
.. _pure-python-installation:
different release cycle.
In order to use the pool you must install the ``pool`` extra, using ``pip
-install psycopg[pool]``, or install the `psycopg_pool` package separately,
+install "psycopg[pool]"``, or install the `psycopg_pool` package separately,
which would allow to specify the release to install more precisely.
In short, run the following::
pip install --upgrade pip # to upgrade pip
- pip install psycopg[binary,pool] # to install package and dependencies
+ pip install "psycopg[binary,pool]" # to install package and dependencies
If something goes wrong, and for more information about installation, please
check out the `Installation documentation`__.
You shouldn't install this package directly: use instead ::
- pip install psycopg[binary]
+ pip install "psycopg[binary]"
to install a version of the optimization package matching the ``psycopg``
version installed.
You shouldn't install this package directly: use instead ::
- pip install psycopg[c]
+ pip install "psycopg[c]"
to install a version of the optimization package matching the ``psycopg``
version installed.
You can also install this package using::
- pip install psycopg[pool]
+ pip install "psycopg[pool]"
Please read `the project readme`__ and `the installation documentation`__ for
more details.
package, specify a connection string in the `PSYCOPG_TEST_DSN` env var to
connect to a test database, and run ``pytest``::
- $ pip install -e psycopg[test]
+ $ pip install -e "psycopg[test]"
$ export PSYCOPG_TEST_DSN="host=localhost dbname=psycopg_test"
$ pytest
-e PSYCOPG_TEST_DSN -e PGHOST=172.17.0.1 -e PGUSER=`whoami` \
python:3.7 bash
- # pip install -e ./psycopg[test] ./psycopg_pool ./psycopg_c
+ # pip install -e "./psycopg[test]" ./psycopg_pool ./psycopg_c
# pytest