iam-abbas / FastAPI-Production-Boilerplate

A scalable and production ready boilerplate for FastAPI
MIT License
430 stars 66 forks source link

poetry install error #2

Closed adrian-jasinski closed 1 year ago

adrian-jasinski commented 1 year ago

Poetry (version 1.4.1) Python: 3.11.2 Implementation: CPython Platform: linux OS: posix OS Distribution: Ubuntu 22.04.2 LTS

When running: poetry install some errors occured:

Package operations: 50 installs, 1 update, 0 removals

• Installing parse (1.19.0): Failed

ChefBuildError

   from _ctypes import Union, Structure, Array

ModuleNotFoundError: No module named '_ctypes'

at ~/.pyenv/versions/3.11.2/lib/python3.11/site-packages/poetry/installation/chef.py:152 in _prepare 148│ 149│ error = ChefBuildError("\n\n".join(message_parts)) 150│ 151│ if error is not None: → 152│ raise error from None 153│ 154│ return path 155│ 156│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with parse (1.19.0) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "parse (==1.19.0)"'.

• Installing wrapt (1.14.1): Failed

ChefBuildError

Backend subprocess exited when trying to invoke build_wheel at ~/.pyenv/versions/3.11.2/lib/python3.11/site-packages/poetry/installation/chef.py:152 in _prepare 148│ 149│ error = ChefBuildError("\n\n".join(message_parts)) 150│ 151│ if error is not None: → 152│ raise error from None 153│ 154│ return path 155│ 156│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with wrapt (1.14.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "wrapt (==1.14.1)"'.

iam-abbas commented 1 year ago

Sorry for late response, this seems like an issue with python installation through pyenv. Try manually installing libffi-dev and reinstalling python.

pyenv uninstall 3.11.2
sudo apt install libffi-dev
pyenv install 3.11.2
pyenv global 3.11.2