altairbow / django-db-connection-pool

Database connection pool component library for Django
https://pypi.python.org/pypi/django-db-connection-pool/
MIT License
181 stars 24 forks source link

Why do we need psycopg2 ? #21

Closed aghure closed 2 years ago

aghure commented 2 years ago

I am trying to install this library on ubantu , i am getting below error.

Using cached https://files.pythonhosted.org/packages/08/e8/fc93fe1b04e3135fdcf4508ab9fc73325725baf2f82cc6f083cd9fee698f/cx_Oracle-8.2.1-cp38-cp38-manylinux1_x86_64.whl Collecting psycopg2>=2.8.6 (from django-db-connection-pool[all]) Using cached https://files.pythonhosted.org/packages/aa/8a/7c80e7e44fb1b4277e89bd9ca509aefdd4dd1b2c547c6f293afe9f7ffd04/psycopg2-2.9.1.tar.gz ERROR: Command errored out with exit status 1: command: /home/bflmfuser/venv383/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pcp77yav/psycopg2/setup.py'"'"'; file='"'"'/tmp/pip-install-pcp77yav/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info cwd: /tmp/pip-install-pcp77yav/psycopg2/ Complete output (23 lines): running egg_info creating pip-egg-info/psycopg2.egg-info writing pip-egg-info/psycopg2.egg-info/PKG-INFO writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'

Error: pg_config executable not found.

pg_config is required to build psycopg2 from source.  Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:

    python setup.py build_ext --pg-config /path/to/pg_config build ...

or with the pg_config option in 'setup.cfg'.

If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.

For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).

I have psycopg2-binary installed on my server. still it is giving the error.

altairbow commented 2 years ago

If you don't need psycopg2, you just need to execute one of them:

  1. pip install django-db-connection-pool[mysql]
  2. pip install django-db-connection-pool[oracle]
  3. pip install django-db-connection-pool[mysql,oracle]

command pip install django-db-connection-pool[all] is not necessary.

altairbow commented 2 years ago

Does it help?

altairbow commented 2 years ago

No feedback, closed