aws-actions / setup-sam

Action to set up AWS SAM CLI and add it to the PATH
Apache License 2.0
151 stars 23 forks source link

Error: pg_config executable not found. #104

Closed kyimkz closed 5 months ago

kyimkz commented 5 months ago
error: subprocess-exited-with-error -- 01:44:34.644 |   01:44:34.644 | × Getting requirements to build wheel did not run successfully. 01:44:34.644 | │ exit code: 1 01:44:34.644 | ╰─> [21 lines of output] 01:44:34.644 | running egg_info 01:44:34.644 | writing psycopg2.egg-info/PKG-INFO 01:44:34.645 | writing dependency_links to psycopg2.egg-info/dependency_links.txt 01:44:34.645 | writing top-level names to psycopg2.egg-info/top_level.txt 01:44:34.645 |   01:44:34.645 | Error: pg_config executable not found. 01:44:34.645 |   01:44:34.645 | pg_config is required to build psycopg2 from source. Please add the directory 01:44:34.645 | containing pg_config to the $PATH or specify the full executable path with the 01:44:34.645 | option: 01:44:34.646 |   01:44:34.646 | python setup.py build_ext --pg-config /path/to/pg_config build ... 01:44:34.646 |   01:44:34.646 | or with the pg_config option in 'setup.cfg'. 01:44:34.646 |   01:44:34.646 | If you prefer to avoid building psycopg2 from source, please install the PyPI 01:44:34.647 | 'psycopg2-binary' package instead. 01:44:34.647 |   01:44:34.647 | For further information please check the 'doc/src/install.rst' file (also at 01:44:34.647 | ). 01:44:34.647 |   01:44:34.647 | [end of output] 01:44:34.648 |   01:44:34.648 | note: This error originates from a subprocess, and is likely not a problem with pip. 01:44:34.650 | error: subprocess-exited-with-error 01:44:34.650 |   01:44:34.650 | × Getting requirements to build wheel did not run successfully. 01:44:34.651 | │ exit code: 1 01:44:34.651 | ╰─> See above for output. 01:44:34.651 |   01:44:34.651 | note: This error originates from a subprocess, and is likely not a problem with pip. 01:44:35.470 | Traceback (most recent call last): 01:44:35.471 | File "/vercel/path0/manage.py", line 11, in main 01:44:35.471 | from django.core.management import execute_from_command_line 01:44:35.471 | ModuleNotFoundError: No module named 'django'

image

i am trying to deploy django app to vercel and keep getting this error please, can someone help me with this?

kyimkz commented 5 months ago

vercel.json

{ "version": 2, "builds": [ { "src": "website/wsgi.py", "use": "@vercel/python", "config": { "maxLambdaSize": "15mb", "runtime": "python3.9.0" } }, { "src": "build_files.sh", "use": "@vercel/static-build", "config": { "distDir": "staticfiles_build" } } ], "routes": [ { "src": "/static/(.)", "dest": "/static/$1" }, { "src": "/(.)", "dest": "website/wsgi.py" } ] }

build_files.sh

pip install -r requirements.txt python3.10 manage.py collectstatic

requirements.txt

anyio==4.0.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.2.3 asgiref==3.7.2 asttokens==2.1.0 async-lru==2.0.4 attrs==23.1.0 Babel==2.12.1 backcall==0.2.0 beautifulsoup4==4.12.2 bleach==6.0.0 blurhash==1.1.4 boost==0.1 certifi==2022.9.24 cffi==1.16.0 charset-normalizer==2.1.1 click==8.1.3 cmake==3.24.2 colorama==0.4.6 comm==0.1.4 contourpy==1.0.6 cycler==0.11.0 debugpy==1.6.3 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 dj-database-url==2.1.0 Django==4.2.11 django-ckeditor==6.7.1 django-heroku==0.3.1 django-jazzmin @ https://github.com/farridav/django-jazzmin/archive/refs/heads/master.zip#sha256=67837d8e88ad56eb7daf1fccebecf7fd900efbb0946f55b1c5896884bc706638 django-js-asset==2.2.0 django-paypal==2.0 django-recaptcha==4.0.0 django-shortuuidfield==0.1.3 django-taggit==5.0.1 dlib==19.24.99 entrypoints==0.4 executing==1.2.0 face-recognition==1.3.0 face-recognition-models @ git+https://github.com/ageitgey/face_recognition_models@e67de717267507d1e9246de95692eb8be736ab61 fastjsonschema==2.18.0 filelock==3.14.0 fonttools==4.38.0 fqdn==1.5.1 greenlet==2.0.0 gunicorn==22.0.0 idna==3.4 intel-openmp==2022.2.0 ipykernel==6.17.1 ipython==8.6.0 ipython-genutils==0.2.0 ipywidgets==8.1.1 isoduration==20.11.0 jedi==0.18.2 Jinja2==3.1.2 json5==0.9.14 jsonpointer==2.4 jsonschema==4.19.1 jsonschema-specifications==2023.7.1 jupyter==1.0.0 jupyter-console==6.6.3 jupyter-events==0.7.0 jupyter-lsp==2.2.0 jupyter_client==7.4.7 jupyter_core==5.3.2 jupyter_server==2.7.3 jupyter_server_terminals==0.4.4 jupyterlab==4.0.6 jupyterlab-pygments==0.2.2 jupyterlab-widgets==3.0.9 jupyterlab_server==2.25.0 kiwisolver==1.4.4 MarkupSafe==2.1.3 Mastodon.py==1.5.1 matplotlib==3.6.2 matplotlib-inline==0.1.6 mistune==3.0.1 mkl==2022.2.0 nbclient==0.8.0 nbconvert==7.8.0 nbformat==5.9.2 nest-asyncio==1.5.6 notebook==7.0.4 notebook_shim==0.2.3 numpy==1.23.4 overrides==7.4.0 packaging==21.3 pandas==1.5.1 pandocfilters==1.5.0 parso==0.8.3 patsy==0.5.3 pickleshare==0.7.5 Pillow==9.3.0 platformdirs==4.2.1 prometheus-client==0.17.1 prompt-toolkit==3.0.33 psutil==5.9.4 pure-eval==0.2.2 pycparser==2.21 Pygments==2.13.0 pyparsing==3.0.9 pyproject-toml==0.0.10 pyrsistent==0.19.1 python-dateutil==2.8.2 python-json-logger==2.0.7 python-magic==0.4.27 pytz==2022.6 pywin32==305 pywinpty==2.0.11 PyYAML==6.0.1 pyzmq==24.0.1 qtconsole==5.4.4 QtPy==2.4.0 referencing==0.30.2 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rpds-py==0.10.3 scipy==1.9.3 seaborn==0.12.1 Send2Trash==1.8.2 shortuuid==1.0.12 six==1.16.0 sniffio==1.3.0 soupsieve==2.5 SQLAlchemy==1.4.42 sqlparse==0.4.4 stack-data==0.6.1 statsmodels==0.13.5 tbb==2021.7.0 terminado==0.17.1 tinycss2==1.2.1 toml==0.10.2 tornado==6.2 traitlets==5.10.1 typing_extensions==4.11.0 tzdata==2024.1 uri-template==1.3.0 urllib3==1.26.12 virtualenv==20.26.1 wcwidth==0.2.5 webcolors==1.13 webencodings==0.5.1 websocket-client==1.6.3 whitenoise==6.6.0 widgetsnbextension==4.0.9

runtime.txt

python-3.9.0

aaythapa commented 5 months ago

Hi @kyimkz, is this error related to setup-sam? From the error log you posted I don't see anything that could be related to this repo