(venv) com015@com015-Inspiron-5570:/media/com015/01D72229A10B6100/PycharmProjects/pythonProject6$ pip install psycopg2
Collecting psycopg2
Downloading psycopg2-2.9.5.tar.gz (384 kB)
|████████████████████████████████| 384 kB 1.3 MB/s
Preparing metadata (setup.py) ... done
Building wheels for collected packages: psycopg2
Building wheel for psycopg2 (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_inyf5x7/psycopg2_9a9b738cde444cb5b30845b02af2eb2f/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_inyf5x7/psycopg2_9a9b738cde444cb5b30845b02af2eb2f/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'"'"'))' bdist_wheel -d /tmp/pip-wheel-c9vjyo9k
cwd: /tmp/pip-install-_inyf5x7/psycopg2_9a9b738cde444cb5b30845b02af2eb2f/
Complete output (36 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/errors.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-3.6/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/psycopg
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_VERSION=2.9.5 (dt dec pq3 ext lo64) -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/include -I/usr/include/python3.6m -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -I/usr/include/x86_64-linux-gnu -I/usr/include/libxml2 -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.6/psycopg/psycopgmodule.o -Wdeclaration-after-statement
In file included from psycopg/psycopgmodule.c:28:0:
./psycopg/psycopg.h:35:20: fatal error: Python.h: No such file or directory
compilation terminated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<
https://www.psycopg.org/docs/install.html>).
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for psycopg2
Running setup.py clean for psycopg2
Failed to build psycopg2
Installing collected packages: psycopg2
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
command: /media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_inyf5x7/psycopg2_9a9b738cde444cb5b30845b02af2eb2f/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_inyf5x7/psycopg2_9a9b738cde444cb5b30845b02af2eb2f/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'"'"'))' install --record /tmp/pip-record-rjqvr1fz/install-record.txt --single-version-externally-managed --compile --install-headers /media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/include/site/python3.6/psycopg2
cwd: /tmp/pip-install-_inyf5x7/psycopg2_9a9b738cde444cb5b30845b02af2eb2f/
Complete output (38 lines):
running install
/media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/lib/python3.6/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/errors.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-3.6/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/psycopg
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_VERSION=2.9.5 (dt dec pq3 ext lo64) -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/include -I/usr/include/python3.6m -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -I/usr/include/x86_64-linux-gnu -I/usr/include/libxml2 -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.6/psycopg/psycopgmodule.o -Wdeclaration-after-statement
In file included from psycopg/psycopgmodule.c:28:0:
./psycopg/psycopg.h:35:20: fatal error: Python.h: No such file or directory
compilation terminated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<
https://www.psycopg.org/docs/install.html>).
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_inyf5x7/psycopg2_9a9b738cde444cb5b30845b02af2eb2f/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_inyf5x7/psycopg2_9a9b738cde444cb5b30845b02af2eb2f/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'"'"'))' install --record /tmp/pip-record-rjqvr1fz/install-record.txt --single-version-externally-managed --compile --install-headers /media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/include/site/python3.6/psycopg2 Check the logs for full command output.
(venv) com015@com015-Inspiron-5570:/media/com015/01D72229A10B6100/PycharmProjects/pythonProject6$ pip3 install psycopg2
Collecting psycopg2
Using cached psycopg2-2.9.5.tar.gz (384 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: psycopg2
Building wheel for psycopg2 (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-31dy5g1b/psycopg2_60cff71faa644e7e81d21992e7286f7e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-31dy5g1b/psycopg2_60cff71faa644e7e81d21992e7286f7e/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'"'"'))' bdist_wheel -d /tmp/pip-wheel-99n0oocx
cwd: /tmp/pip-install-31dy5g1b/psycopg2_60cff71faa644e7e81d21992e7286f7e/
Complete output (36 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/errors.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-3.6/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/psycopg
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_VERSION=2.9.5 (dt dec pq3 ext lo64) -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/include -I/usr/include/python3.6m -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -I/usr/include/x86_64-linux-gnu -I/usr/include/libxml2 -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.6/psycopg/psycopgmodule.o -Wdeclaration-after-statement
In file included from psycopg/psycopgmodule.c:28:0:
./psycopg/psycopg.h:35:20: fatal error: Python.h: No such file or directory
compilation terminated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<
https://www.psycopg.org/docs/install.html>).
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for psycopg2
Running setup.py clean for psycopg2
Failed to build psycopg2
Installing collected packages: psycopg2
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
command: /media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-31dy5g1b/psycopg2_60cff71faa644e7e81d21992e7286f7e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-31dy5g1b/psycopg2_60cff71faa644e7e81d21992e7286f7e/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'"'"'))' install --record /tmp/pip-record-3avupgt3/install-record.txt --single-version-externally-managed --compile --install-headers /media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/include/site/python3.6/psycopg2
cwd: /tmp/pip-install-31dy5g1b/psycopg2_60cff71faa644e7e81d21992e7286f7e/
Complete output (38 lines):
running install
/media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/lib/python3.6/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/errors.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-3.6/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-3.6/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/psycopg
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_VERSION=2.9.5 (dt dec pq3 ext lo64) -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/include -I/usr/include/python3.6m -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -I/usr/include/x86_64-linux-gnu -I/usr/include/libxml2 -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.6/psycopg/psycopgmodule.o -Wdeclaration-after-statement
In file included from psycopg/psycopgmodule.c:28:0:
./psycopg/psycopg.h:35:20: fatal error: Python.h: No such file or directory
compilation terminated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<
https://www.psycopg.org/docs/install.html>).
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-31dy5g1b/psycopg2_60cff71faa644e7e81d21992e7286f7e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-31dy5g1b/psycopg2_60cff71faa644e7e81d21992e7286f7e/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'"'"'))' install --record /tmp/pip-record-3avupgt3/install-record.txt --single-version-externally-managed --compile --install-headers /media/com015/01D72229A10B6100/PycharmProjects/pythonProject6/venv/include/site/python3.6/psycopg2 Check the logs for full command output.
(venv) com015@com015-Inspiron-5570:/media/com015/01D72229A10B6100/PycharmProjects/pythonProject6$ pip3 insta