guptakvgaurav / sample_django

A very minimalistic DRF based boilerplate meant to get started quickly.
MIT License
0 stars 1 forks source link

Unable to run project on local #2

Open VibhorKukreja opened 4 years ago

VibhorKukreja commented 4 years ago

Some of the doubts and queries: • Requirements.txt doesn't resolves every dependencies. • Why do we need Kafka? • Please mention the Python version required.

Getting following errors


  Downloading Django-2.2-py3-none-any.whl (7.4 MB)
     |████████████████████████████████| 7.4 MB 5.8 MB/s 
Requirement already satisfied: djangorestframework==3.10 in /Users/vibhorkukreja/python_projects/sam_dgo/lib/python3.8/site-packages (from -r requirements.txt (line 2)) (3.10.0)
Collecting psycopg2-binary<2.8.0,>=2.7.5
  Using cached psycopg2-binary-2.7.7.tar.gz (428 kB)
Requirement already satisfied: rest_condition==1.0.3 in /Users/vibhorkukreja/python_projects/sam_dgo/lib/python3.8/site-packages (from -r requirements.txt (line 4)) (1.0.3)
Requirement already satisfied: django-logpipe==1.0.0 in /Users/vibhorkukreja/python_projects/sam_dgo/lib/python3.8/site-packages (from -r requirements.txt (line 5)) (1.0.0)
Collecting kafka-python==2.0.0
  Using cached kafka_python-2.0.0-py2.py3-none-any.whl (232 kB)
Requirement already satisfied: sqlparse in /Users/vibhorkukreja/python_projects/sam_dgo/lib/python3.8/site-packages (from Django==2.2.0->-r requirements.txt (line 1)) (0.3.1)
Requirement already satisfied: pytz in /Users/vibhorkukreja/python_projects/sam_dgo/lib/python3.8/site-packages (from Django==2.2.0->-r requirements.txt (line 1)) (2020.1)
Requirement already satisfied: lru-dict>=1.1.6 in /Users/vibhorkukreja/python_projects/sam_dgo/lib/python3.8/site-packages (from django-logpipe==1.0.0->-r requirements.txt (line 5)) (1.1.6)
Could not build wheels for djangorestframework, since package 'wheel' is not installed.
Could not build wheels for psycopg2-binary, since package 'wheel' is not installed.
Could not build wheels for rest-condition, since package 'wheel' is not installed.
Could not build wheels for django-logpipe, since package 'wheel' is not installed.
Could not build wheels for sqlparse, since package 'wheel' is not installed.
Could not build wheels for pytz, since package 'wheel' is not installed.
Could not build wheels for lru-dict, since package 'wheel' is not installed.
Installing collected packages: Django, psycopg2-binary, kafka-python
  Attempting uninstall: Django
    Found existing installation: Django 3.0.5
    Uninstalling Django-3.0.5:
      Successfully uninstalled Django-3.0.5
    Running setup.py install for psycopg2-binary ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/vibhorkukreja/python_projects/sam_dgo/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dh/h1cwqltx57jc16ry8x7hf9l40000gn/T/pip-install-va19wv7a/psycopg2-binary/setup.py'"'"'; __file__='"'"'/private/var/folders/dh/h1cwqltx57jc16ry8x7hf9l40000gn/T/pip-install-va19wv7a/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 /private/var/folders/dh/h1cwqltx57jc16ry8x7hf9l40000gn/T/pip-record-w8_2i15f/install-record.txt --single-version-externally-managed --compile --install-headers /Users/vibhorkukreja/python_projects/sam_dgo/include/site/python3.8/psycopg2-binary
         cwd: /private/var/folders/dh/h1cwqltx57jc16ry8x7hf9l40000gn/T/pip-install-va19wv7a/psycopg2-binary/
    Complete output (81 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.15-x86_64-3.8
    creating build/lib.macosx-10.15-x86_64-3.8/psycopg2
    copying lib/_json.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2
    copying lib/extras.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2
    copying lib/errorcodes.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2
    copying lib/tz.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2
    copying lib/_range.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2
    copying lib/_ipaddress.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2
    copying lib/__init__.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2
    copying lib/psycopg1.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2
    copying lib/extensions.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2
    copying lib/sql.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2
    copying lib/pool.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2
    creating build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_transaction.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/dbapi20.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_extras_dictcursor.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_with.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_types_basic.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_bug_gc.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_module.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_psycopg2_dbapi20.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_async.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_dates.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_async_keyword.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/testutils.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_connection.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_copy.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_bugX000.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/__init__.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_cursor.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_types_extras.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_sql.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_fast_executemany.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_green.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_ipaddress.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_cancel.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_quote.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/testconfig.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_errcodes.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_replication.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_lobject.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/test_notify.py -> build/lib.macosx-10.15-x86_64-3.8/psycopg2/tests
    copying tests/dbapi20_tpc.py -> build/lib.macosx-10.15-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.macosx-10.15-x86_64-3.8
    creating build/temp.macosx-10.15-x86_64-3.8/psycopg
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.7 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=120001 -DHAVE_LO64=1 -I/Users/vibhorkukreja/python_projects/sam_dgo/include -I/Users/vibhorkukreja/.pyenv/versions/3.8.0/include/python3.8 -I. -I/usr/local/include -I/usr/local/include/postgresql/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.15-x86_64-3.8/psycopg/psycopgmodule.o
    psycopg/psycopgmodule.c:689:18: error: incomplete definition of type 'struct _is'
        while (interp->next)
               ~~~~~~^
    /Users/vibhorkukreja/.pyenv/versions/3.8.0/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
    struct _is;
           ^
    psycopg/psycopgmodule.c:690:24: error: incomplete definition of type 'struct _is'
            interp = interp->next;
                     ~~~~~~^
    /Users/vibhorkukreja/.pyenv/versions/3.8.0/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
    struct _is;
           ^
    2 errors generated.

    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 'clang' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/vibhorkukreja/python_projects/sam_dgo/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dh/h1cwqltx57jc16ry8x7hf9l40000gn/T/pip-install-va19wv7a/psycopg2-binary/setup.py'"'"'; __file__='"'"'/private/var/folders/dh/h1cwqltx57jc16ry8x7hf9l40000gn/T/pip-install-va19wv7a/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 /private/var/folders/dh/h1cwqltx57jc16ry8x7hf9l40000gn/T/pip-record-w8_2i15f/install-record.txt --single-version-externally-managed --compile --install-headers /Users/vibhorkukreja/python_projects/sam_dgo/include/site/python3.8/psycopg2-binary Check the logs for full command output.```
guptakvgaurav commented 4 years ago