vitorfs / colossus

Self-hosted email marketing solution
https://colossus.readthedocs.io
MIT License
524 stars 129 forks source link

Error :: unable to install requirements #43

Open aniruddha-ca opened 3 years ago

aniruddha-ca commented 3 years ago

Getting many of these errors while running command


pip install -r requirements/development.txt

Any solution

Building wheel for psycopg2-binary (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/local/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3m9k2s8f/psycopg2-binary_d02a87e256d34a7784aaf2664fa971e6/setup.py'"'"'; file='"'"'/tmp/pip-install-3m9k2s8f/psycopg2-binary_d02a87e256d34a7784aaf2664fa971e6/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-kovbjbw4 cwd: /tmp/pip-install-3m9k2s8f/psycopg2-binary_d02a87e256d34a7784aaf2664fa971e6/ Complete output (86 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.9 creating build/lib.linux-x86_64-3.9/psycopg2 copying lib/_range.py -> build/lib.linux-x86_64-3.9/psycopg2 copying lib/tz.py -> build/lib.linux-x86_64-3.9/psycopg2 copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.9/psycopg2 copying lib/_json.py -> build/lib.linux-x86_64-3.9/psycopg2 copying lib/extras.py -> build/lib.linux-x86_64-3.9/psycopg2 copying lib/pool.py -> build/lib.linux-x86_64-3.9/psycopg2 copying lib/init.py -> build/lib.linux-x86_64-3.9/psycopg2 copying lib/psycopg1.py -> build/lib.linux-x86_64-3.9/psycopg2 copying lib/sql.py -> build/lib.linux-x86_64-3.9/psycopg2 copying lib/extensions.py -> build/lib.linux-x86_64-3.9/psycopg2 copying lib/errorcodes.py -> build/lib.linux-x86_64-3.9/psycopg2 creating build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_notify.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_bugX000.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/testutils.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_with.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_errcodes.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_sql.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_types_basic.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/dbapi20.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_module.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_copy.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_replication.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_cancel.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_psycopg2_dbapi20.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_bug_gc.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_quote.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_cursor.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_async_keyword.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/init.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_ipaddress.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_fast_executemany.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/testconfig.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/dbapi20_tpc.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_extras_dictcursor.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_connection.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_lobject.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_transaction.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_types_extras.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_dates.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_green.py -> build/lib.linux-x86_64-3.9/psycopg2/tests copying tests/test_async.py -> build/lib.linux-x86_64-3.9/psycopg2/tests Skipping optional fixer: buffer Skipping optional fixer: idioms Skipping optional fixer: set_literal Skipping optional fixer: ws_comma running build_ext building 'psycopg2._psycopg' extension creating build/temp.linux-x86_64-3.9 creating build/temp.linux-x86_64-3.9/psycopg gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/adapter_asis.c -o build/temp.linux-x86_64-3.9/psycopg/adapter_asis.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/adapter_binary.c -o build/temp.linux-x86_64-3.9/psycopg/adapter_binary.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/adapter_datetime.c -o build/temp.linux-x86_64-3.9/psycopg/adapter_datetime.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/adapter_list.c -o build/temp.linux-x86_64-3.9/psycopg/adapter_list.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/adapter_pboolean.c -o build/temp.linux-x86_64-3.9/psycopg/adapter_pboolean.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/adapter_pdecimal.c -o build/temp.linux-x86_64-3.9/psycopg/adapter_pdecimal.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/adapter_pfloat.c -o build/temp.linux-x86_64-3.9/psycopg/adapter_pfloat.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/adapter_pint.c -o build/temp.linux-x86_64-3.9/psycopg/adapter_pint.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/adapter_qstring.c -o build/temp.linux-x86_64-3.9/psycopg/adapter_qstring.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/bytes_format.c -o build/temp.linux-x86_64-3.9/psycopg/bytes_format.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/connection_int.c -o build/temp.linux-x86_64-3.9/psycopg/connection_int.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/connection_type.c -o build/temp.linux-x86_64-3.9/psycopg/connection_type.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/cursor_int.c -o build/temp.linux-x86_64-3.9/psycopg/cursor_int.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/cursor_type.c -o build/temp.linux-x86_64-3.9/psycopg/cursor_type.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/diagnostics_type.c -o build/temp.linux-x86_64-3.9/psycopg/diagnostics_type.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/error_type.c -o build/temp.linux-x86_64-3.9/psycopg/error_type.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/green.c -o build/temp.linux-x86_64-3.9/psycopg/green.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/libpq_support.c -o build/temp.linux-x86_64-3.9/psycopg/libpq_support.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/lobject_int.c -o build/temp.linux-x86_64-3.9/psycopg/lobject_int.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/lobject_type.c -o build/temp.linux-x86_64-3.9/psycopg/lobject_type.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/microprotocols.c -o build/temp.linux-x86_64-3.9/psycopg/microprotocols.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/microprotocols_proto.c -o build/temp.linux-x86_64-3.9/psycopg/microprotocols_proto.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/notify_type.c -o build/temp.linux-x86_64-3.9/psycopg/notify_type.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/pqpath.c -o build/temp.linux-x86_64-3.9/psycopg/pqpath.o -Wdeclaration-after-statement gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130003 -DHAVE_LO64=1 -I/usr/local/include/python3.9 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.9/psycopg/psycopgmodule.o -Wdeclaration-after-statement psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’: psycopg/psycopgmodule.c:689:18: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’} 689 | while (interp->next) | ^~ error: command '/usr/bin/gcc' failed with exit code 1

ERROR: Failed building wheel for psycopg2-binary Running setup.py clean for psycopg2-binary Building wheel for python-decouple (setup.py) ... done Created wheel for python-decouple: filename=python_decouple-3.1-py3-none-any.whl size=7916 sha256=8482e86bc663c9abbefac94b0cca1c74fe2b3eefff3851c544f889dfc75aec4a Stored in directory: /home/csestack/.cache/pip/wheels/d4/41/83/3d0b292b9f5a8a5ae3d13833cd02e5c029ab41df830355b682 Building wheel for coverage (setup.py) ... done Created wheel for coverage: filename=coverage-4.5.2-cp39-cp39-linux_x86_64.whl size=214855 sha256=6fb588ff464430f1d0cf1f0d715fdd36e48ad915a08d7489df9b2f01b476bf29 Stored in directory: /home/csestack/.cache/pip/wheels/12/2f/fa/54c36031f93afcdd614a24120baa3b053ef288d731d55df6d3 Building wheel for billiard (setup.py) ... done Created wheel for billiard: filename=billiard-3.5.0.5-py3-none-any.whl size=87880 sha256=a4134dcf6eafc1aafaa520a4de71c7297dd79f17b869724737bebb5a8754c0ea Stored in directory: /home/csestack/.cache/pip/wheels/cc/a8/5d/8fc2e8e4255e5e33e4b3a26ade7a7385e67b4992a8b7e697f9 Building wheel for maxminddb (setup.py) ... done Created wheel for maxminddb: filename=maxminddb-2.0.3-cp39-cp39-linux_x86_64.whl size=45850 sha256=0cbb85e62108b3ec90d2aa190231f5184e30e37e3dab1c80c09e94dac0d4ae7f Stored in directory: /home/csestack/.cache/pip/wheels/ad/0c/82/79e41ebe67044c68a5087459a9ea7447cb0756019071318197 Building wheel for typed-ast (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/local/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3m9k2s8f/typed-ast_13e2b13fd3284df9a746449af656e4db/setup.py'"'"'; file='"'"'/tmp/pip-install-3m9k2s8f/typed-ast_13e2b13fd3284df9a746449af656e4db/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-bbj2e61a cwd: /tmp/pip-install-3m9k2s8f/typed-ast_13e2b13fd3284df9a746449af656e4db/ Complete output (24 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.9 creating build/lib.linux-x86_64-3.9/typed_ast copying typed_ast/conversions.py -> build/lib.linux-x86_64-3.9/typed_ast copying typed_ast/init.py -> build/lib.linux-x86_64-3.9/typed_ast copying typed_ast/ast3.py -> build/lib.linux-x86_64-3.9/typed_ast copying typed_ast/ast27.py -> build/lib.linux-x86_64-3.9/typed_ast running build_ext building '_ast27' extension creating build/temp.linux-x86_64-3.9 creating build/temp.linux-x86_64-3.9/ast27 creating build/temp.linux-x86_64-3.9/ast27/Custom creating build/temp.linux-x86_64-3.9/ast27/Parser creating build/temp.linux-x86_64-3.9/ast27/Python gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/usr/local/include/python3.9 -c ast27/Custom/typed_ast.c -o build/temp.linux-x86_64-3.9/ast27/Custom/typed_ast.o gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/usr/local/include/python3.9 -c ast27/Parser/acceler.c -o build/temp.linux-x86_64-3.9/ast27/Parser/acceler.o ast27/Parser/acceler.c:13:10: fatal error: pgenheaders.h: No such file or directory 13 | #include "pgenheaders.h" | ^~~~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1

ERROR: Failed building wheel for typed-ast Running setup.py clean for typed-ast Successfully built python-decouple coverage billiard maxminddb Failed to build psycopg2-binary typed-ast Installing collected packages: vine, urllib3, pytz, idna, chardet, amqp, typed-ast, requests, pyflakes, pycodestyle, prompt-toolkit, mccabe, maxminddb, kombu, Faker, Django, billiard, tox, python-decouple, psycopg2-binary, mypy, isort, ipython, html2text, geoip2, flake8, factory-boy, django-ratelimit, django-debug-toolbar, django-crispy-forms, dj-database-url, coverage, celery, beautifulsoup4 Running setup.py install for typed-ast ... error ERROR: Command errored out with exit status 1: command: /usr/local/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3m9k2s8f/typed-ast_13e2b13fd3284df9a746449af656e4db/setup.py'"'"'; file='"'"'/tmp/pip-install-3m9k2s8f/typed-ast_13e2b13fd3284df9a746449af656e4db/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-zeafi0cm/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/csestack/.local/include/python3.9/typed-ast cwd: /tmp/pip-install-3m9k2s8f/typed-ast_13e2b13fd3284df9a746449af656e4db/ Complete output (24 lines): running install running build running build_py creating build creating build/lib.linux-x86_64-3.9 creating build/lib.linux-x86_64-3.9/typed_ast copying typed_ast/conversions.py -> build/lib.linux-x86_64-3.9/typed_ast copying typed_ast/init.py -> build/lib.linux-x86_64-3.9/typed_ast copying typed_ast/ast3.py -> build/lib.linux-x86_64-3.9/typed_ast copying typed_ast/ast27.py -> build/lib.linux-x86_64-3.9/typed_ast running build_ext building '_ast27' extension creating build/temp.linux-x86_64-3.9 creating build/temp.linux-x86_64-3.9/ast27 creating build/temp.linux-x86_64-3.9/ast27/Custom creating build/temp.linux-x86_64-3.9/ast27/Parser creating build/temp.linux-x86_64-3.9/ast27/Python gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/usr/local/include/python3.9 -c ast27/Custom/typed_ast.c -o build/temp.linux-x86_64-3.9/ast27/Custom/typed_ast.o gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/usr/local/include/python3.9 -c ast27/Parser/acceler.c -o build/temp.linux-x86_64-3.9/ast27/Parser/acceler.o ast27/Parser/acceler.c:13:10: fatal error: pgenheaders.h: No such file or directory 13 | #include "pgenheaders.h" | ^~~~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1

ERROR: Command errored out with exit status 1: /usr/local/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3m9k2s8f/typed-ast_13e2b13fd3284df9a746449af656e4db/setup.py'"'"'; file='"'"'/tmp/pip-install-3m9k2s8f/typed-ast_13e2b13fd3284df9a746449af656e4db/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-zeafi0cm/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/csestack/.local/include/python3.9/typed-ast Check the logs for full command output. 12:29 ~/colossus (master)$ pip install -r requirements

julioriffel commented 3 years ago

Install the prerequsisites for building the psycopg2 package from source:

Debian/Ubuntu Python 3 sudo apt install libpq-dev python3-dev

aniruddha-ca commented 3 years ago

@julioriffel Even after running those commands it is failing...

Can you please check once? Thanks


Building wheels for collected packages: psycopg2-binary, typed-ast Building wheel for psycopg2-binary (setup.py) ... error ERROR: Command errored out with exit status 1: command: /home/csestack/colossus/env_colossus/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-r35qkezm/psycopg2-binary/setup.py'"'"'; file='"'"'/tmp/pip-install-r35qkezm/psycopg2-binary/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-fgcc8uvo cwd: /tmp/pip-install-r35qkezm/psycopg2-binary/ Complete output (72 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/psycopg2 copying lib/errorcodes.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/extensions.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/extras.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/pool.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/psycopg1.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/sql.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/tz.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/_json.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/_range.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/init.py -> build/lib.linux-x86_64-3.8/psycopg2 creating build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/dbapi20.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/dbapi20_tpc.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/testconfig.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/testutils.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_async.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_async_keyword.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_bugX000.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_bug_gc.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_cancel.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_connection.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_copy.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_cursor.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_dates.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_errcodes.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_extras_dictcursor.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_fast_executemany.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_green.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_lobject.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_module.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_notify.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_psycopg2_dbapi20.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_quote.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_replication.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_sql.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_transaction.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_types_basic.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_types_extras.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_with.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/init.py -> build/lib.linux-x86_64-3.8/psycopg2/tests Skipping optional fixer: buffer Skipping optional fixer: idioms Skipping optional fixer: set_literal Skipping optional fixer: ws_comma running build_ext building 'psycopg2._psycopg' extension creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/psycopg x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=120007 -DHAVE_LO64=1 -I/home/csestack/colossus/env_colossus/include -I/usr/include/python3.8 -I. -I/usr/include/postgresql -I/usr/include/postgresql/12/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.8/psycopg/psycopgmodule.o -Wdeclaration-after-statement psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’: psycopg/psycopgmodule.c:689:18: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’} 689 | while (interp->next) | ^~

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 http://initd.org/psycopg/docs/install.html).

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

ERROR: Failed building wheel for psycopg2-binary Running setup.py clean for psycopg2-binary Building wheel for typed-ast (setup.py) ... error ERROR: Command errored out with exit status 1: command: /home/csestack/colossus/env_colossus/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-r35qkezm/typed-ast/setup.py'"'"'; file='"'"'/tmp/pip-install-r35qkezm/typed-ast/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ff4eq69n cwd: /tmp/pip-install-r35qkezm/typed-ast/ Complete output (23 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/typed_ast copying typed_ast/ast27.py -> build/lib.linux-x86_64-3.8/typed_ast copying typed_ast/ast3.py -> build/lib.linux-x86_64-3.8/typed_ast copying typed_ast/conversions.py -> build/lib.linux-x86_64-3.8/typed_ast copying typed_ast/init.py -> build/lib.linux-x86_64-3.8/typed_ast running build_ext building '_ast27' extension creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/ast27 creating build/temp.linux-x86_64-3.8/ast27/Parser creating build/temp.linux-x86_64-3.8/ast27/Python creating build/temp.linux-x86_64-3.8/ast27/Custom x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iast27/Include -I/home/csestack/colossus/env_colossus/include -I/usr/include/python3.8 -c ast27/Parser/acceler.c -o build/temp.linux-x86_64-3.8/ast27/Parser/acceler.o ast27/Parser/acceler.c:13:10: fatal error: pgenheaders.h: No such file or directory 13 | #include "pgenheaders.h" | ^~~~~~~ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

ERROR: Failed building wheel for typed-ast Running setup.py clean for typed-ast Failed to build psycopg2-binary typed-ast Installing collected packages: psycopg2-binary, python-decouple, coverage, six, python-dateutil, text-unidecode, Faker, factory-boy, mccabe, pyflakes, pycodestyle, flake8, isort, filelock, py, pluggy, toml, distlib, appdirs, virtualenv, tox, typed-ast, mypy-extensions, mypy, wcwidth, prompt-toolkit, pickleshare, ipython-genutils, traitlets, parso, jedi, backcall, ptyprocess, pexpect, decorator, pygments, ipython Attempting uninstall: psycopg2-binary Found existing installation: psycopg2-binary 2.9.1 Uninstalling psycopg2-binary-2.9.1: Successfully uninstalled psycopg2-binary-2.9.1 Running setup.py install for psycopg2-binary ... error ERROR: Command errored out with exit status 1: command: /home/csestack/colossus/env_colossus/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-r35qkezm/psycopg2-binary/setup.py'"'"'; file='"'"'/tmp/pip-install-r35qkezm/psycopg2-binary/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-zgskhvfd/install-record.txt --single-version-externally-managed --compile --install-headers /home/csestack/colossus/env_colossus/include/site/python3.8/psycopg2-binary cwd: /tmp/pip-install-r35qkezm/psycopg2-binary/ Complete output (72 lines): running install running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/psycopg2 copying lib/errorcodes.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/extensions.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/extras.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/pool.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/psycopg1.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/sql.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/tz.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/_json.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/_range.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/init.py -> build/lib.linux-x86_64-3.8/psycopg2 creating build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/dbapi20.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/dbapi20_tpc.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/testconfig.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/testutils.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_async.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_async_keyword.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_bugX000.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_bug_gc.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_cancel.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_connection.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_copy.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_cursor.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_dates.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_errcodes.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_extras_dictcursor.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_fast_executemany.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_green.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_lobject.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_module.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_notify.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_psycopg2_dbapi20.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_quote.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_replication.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_sql.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_transaction.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_types_basic.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_types_extras.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/test_with.py -> build/lib.linux-x86_64-3.8/psycopg2/tests copying tests/init.py -> build/lib.linux-x86_64-3.8/psycopg2/tests Skipping optional fixer: buffer Skipping optional fixer: idioms Skipping optional fixer: set_literal Skipping optional fixer: ws_comma running build_ext building 'psycopg2._psycopg' extension creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/psycopg x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.6.1 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=120007 -DHAVE_LO64=1 -I/home/csestack/colossus/env_colossus/include -I/usr/include/python3.8 -I. -I/usr/include/postgresql -I/usr/include/postgresql/12/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.8/psycopg/psycopgmodule.o -Wdeclaration-after-statement psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’: psycopg/psycopgmodule.c:689:18: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’} 689 | while (interp->next) | ^~

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
<http://initd.org/psycopg/docs/install.html>).

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------

Rolling back uninstall of psycopg2-binary Moving to /home/csestack/colossus/env_colossus/lib/python3.8/site-packages/psycopg2/ from /home/csestack/colossus/env_colossus/lib/python3.8/site-packages/~sycopg2 Moving to /home/csestack/colossus/env_colossus/lib/python3.8/site-packages/psycopg2_binary-2.9.1.dist-info/ from /home/csestack/colossus/env_colossus/lib/python3.8/site-packages/~sycopg2_binary-2.9.1.dist-info Moving to /home/csestack/colossus/env_colossus/lib/python3.8/site-packages/psycopg2_binary.libs/ from /home/csestack/colossus/env_colossus/lib/python3.8/site-packages/~sycopg2_binary.libs ERROR: Command errored out with exit status 1: /home/csestack/colossus/env_colossus/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-r35qkezm/psycopg2-binary/setup.py'"'"'; file='"'"'/tmp/pip-install-r35qkezm/psycopg2-binary/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-zgskhvfd/install-record.txt --single-version-externally-managed --compile --install-headers /home/csestack/colossus/env_colossus/include/site/python3.8/psycopg2-binary Check the logs for full command output.