since I have problems with pip / pip3 I use a different command
in general, I am trying to install psycorg2 with the command python3 -m pip install django-psycopg2
and I get this error
MacBook-Air-Squidward:~ work$ python3 -m pip install psycopg2
Collecting psycopg2
Downloading psycopg2-2.9.1.tar.gz (379 kB)
|████████████████████████████████| 379 kB 374 kB/s
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-c297rqlu/psycopg2_233fa5d142f64c2cba5a96218ffb959e/setup.py'"'"'; __file__='"'"'/private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-c297rqlu/psycopg2_233fa5d142f64c2cba5a96218ffb959e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-a3yk9k7f
cwd: /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-c297rqlu/psycopg2_233fa5d142f64c2cba5a96218ffb959e/
Complete output (23 lines):
running egg_info
creating /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-a3yk9k7f/psycopg2.egg-info
writing /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-a3yk9k7f/psycopg2.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-a3yk9k7f/psycopg2.egg-info/dependency_links.txt
writing top-level names to /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-a3yk9k7f/psycopg2.egg-info/top_level.txt
writing manifest file '/private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-a3yk9k7f/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>).
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/aa/8a/7c80e7e44fb1b4277e89bd9ca509aefdd4dd1b2c547c6f293afe9f7ffd04/psycopg2-2.9.1.tar.gz#sha256=de5303a6f1d0a7a34b9d40e4d3bef684ccc44a49bbe3eb85e3c0bffb4a131b7c (from https://pypi.org/simple/psycopg2/) (requires-python:>=3.6). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading psycopg2-2.9.tar.gz (379 kB)
|████████████████████████████████| 379 kB 382 kB/s
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-c297rqlu/psycopg2_1e235790b3fa49c8bd0f42700bd9936e/setup.py'"'"'; __file__='"'"'/private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-c297rqlu/psycopg2_1e235790b3fa49c8bd0f42700bd9936e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-iticnzqu
cwd: /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-c297rqlu/psycopg2_1e235790b3fa49c8bd0f42700bd9936e/
Complete output (23 lines):
running egg_info
creating /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-iticnzqu/psycopg2.egg-info
writing /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-iticnzqu/psycopg2.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-iticnzqu/psycopg2.egg-info/dependency_links.txt
writing top-level names to /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-iticnzqu/psycopg2.egg-info/top_level.txt
writing manifest file '/private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-iticnzqu/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>).
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/6c/79/6df8af2405e2aa60732c47757453fc7fa4af5c90a1796b3392ef892d3a52/psycopg2-2.9.tar.gz#sha256=b12073fdf2002e828e5921be2c39ff9c6eab361c5c0bd6c529619fc23677accc (from https://pypi.org/simple/psycopg2/) (requires-python:>=3.6). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading psycopg2-2.8.6.tar.gz (383 kB)
|████████████████████████████████| 383 kB 1.1 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-c297rqlu/psycopg2_3976186cdd884e73b8b2ddd8201a04d9/setup.py'"'"'; __file__='"'"'/private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-c297rqlu/psycopg2_3976186cdd884e73b8b2ddd8201a04d9/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-qmsn21ct
cwd: /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-c297rqlu/psycopg2_3976186cdd884e73b8b2ddd8201a04d9/
Complete output (23 lines):
running egg_info
creating /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-qmsn21ct/psycopg2.egg-info
writing /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-qmsn21ct/psycopg2.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-qmsn21ct/psycopg2.egg-info/dependency_links.txt
writing top-level names to /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-qmsn21ct/psycopg2.egg-info/top_level.txt
writing manifest file '/private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-qmsn21ct/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>).
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/fd/ae/98cb7a0cbb1d748ee547b058b14604bd0e9bf285a8e0cc5d148f8a8a952e/psycopg2-2.8.6.tar.gz#sha256=fb23f6c71107c37fd667cb4ea363ddeb936b348bbd6449278eb92c189699f543 (from https://pypi.org/simple/psycopg2/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading psycopg2-2.8.5.tar.gz (380 kB)
|████████████████████████████████| 380 kB 933 kB/s
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-c297rqlu/psycopg2_022cd02ee8094214ab3f32a62a61dfc2/setup.py'"'"'; __file__='"'"'/private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-c297rqlu/psycopg2_022cd02ee8094214ab3f32a62a61dfc2/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-6c1h_egv
cwd: /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-c297rqlu/psycopg2_022cd02ee8094214ab3f32a62a61dfc2/
Complete output (23 lines):
running egg_info
creating /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-6c1h_egv/psycopg2.egg-info
writing /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-6c1h_egv/psycopg2.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-6c1h_egv/psycopg2.egg-info/dependency_links.txt
writing top-level names to /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-6c1h_egv/psycopg2.egg-info/top_level.txt
writing manifest file '/private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-6c1h_egv/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>).
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/a8/8f/1c5690eebf148d1d1554fc00ccf9101e134636553dbb75bdfef4f85d7647/psycopg2-2.8.5.tar.gz#sha256=f7d46240f7a1ae1dd95aab38bd74f7428d46531f69219954266d669da60c0818 (from https://pypi.org/simple/psycopg2/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
after all this chaos, the latest warning looks like this
WARNING: Discarding https://files.pythonhosted.org/packages/2d/d7/496da11d7c81971870ddd36800419c4f84e8f6208aac5eabedf9f7748729/psycopg2-2.0.11.tar.gz#sha256=e6b4e0e41df97441eff34e00065376414da6488e0d55848a45cd77551dbae434 (from https://pypi.org/simple/psycopg2/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached psycopg2-2.0.10.tar.gz (255 kB)
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-xnijw26c/psycopg2_9aef2a73c16c44b4a26c69e163df2a77/setup.py'"'"'; __file__='"'"'/private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-xnijw26c/psycopg2_9aef2a73c16c44b4a26c69e163df2a77/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-pip-egg-info-1jh7lpv9
cwd: /private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-xnijw26c/psycopg2_9aef2a73c16c44b4a26c69e163df2a77/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/s5/_tnp_0sj6z7_ph_j8vrbzvdm0000gp/T/pip-install-xnijw26c/psycopg2_9aef2a73c16c44b4a26c69e163df2a77/setup.py", line 50, in <module>
import ConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/19/79/35c7596bab4456f3610c12ec542a94d51c6781ced587d1d85127210b879b/psycopg2-2.0.10.tar.gz#sha256=e40cc04b43849085725076ae134bfef9e3b087f6dd7c964aeeb930e2f0bc14ab (from https://pypi.org/simple/psycopg2/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement psycopg2 (from versions: 2.0.10, 2.0.11, 2.0.12, 2.0.13, 2.0.14, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.3.2, 2.4, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.5, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.5, 2.6, 2.6.1, 2.6.2, 2.7, 2.7.1, 2.7.2, 2.7.3, 2.7.3.1, 2.7.3.2, 2.7.4, 2.7.5, 2.7.6, 2.7.6.1, 2.7.7, 2.8, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.8.5, 2.8.6, 2.9, 2.9.1)
ERROR: No matching distribution found for psycopg2
before that, I installed the modules with the same command and there were no problems, with the installation of psycorg2 such a problem appeared, I will be glad for any help
Thank you!