Skip to content

build error #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
valsha opened this issue Jan 15, 2023 · 4 comments
Closed

build error #4

valsha opened this issue Jan 15, 2023 · 4 comments

Comments

@valsha
Copy link

valsha commented Jan 15, 2023

Good day, after

  1. docker-compose build --no-cache
  2. i have this error:
[celeryworker:latest  5/11] RUN bash -c "if [ true == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --no-dev ; fi":
#0 0.563 Skipping virtualenv creation, as specified in config file.
#0 0.695 Installing dependencies from lock file
#0 1.183 
#0 1.183 Package operations: 93 installs, 1 update, 0 removals
#0 1.183 
#0 1.184   • Installing idna (3.4)
#0 1.184   • Installing sniffio (1.3.0)
#0 3.443   • Installing anyio (3.6.2)
#0 3.446   • Installing certifi (2022.12.7)
#0 3.449   • Installing charset-normalizer (2.1.1)
#0 3.451   • Installing typing-extensions (4.4.0)
#0 3.451   • Installing pycparser (2.21)
#0 3.461   • Installing urllib3 (1.26.13)
#0 3.461   • Installing vine (5.0.0)
#0 3.463   • Installing wcwidth (0.2.5)
#0 5.971   • Installing amqp (5.1.1)
#0 5.974   • Installing asgiref (3.5.2)
#0 5.975   • Installing cachetools (5.2.0)
#0 5.978   • Installing click (8.1.3)
#0 5.980   • Installing cffi (1.15.1)
#0 5.982   • Installing attrs (22.1.0)
#0 5.984   • Installing cssselect (1.2.0)
#0 5.985   • Installing cssutils (2.6.0)
#0 7.980   • Installing exceptiongroup (1.0.4)
#0 8.755   • Installing greenlet (2.0.1)
#0 9.152   • Installing h11 (0.14.0)
#0 9.401   • Installing iniconfig (1.1.1)
#0 9.402   • Installing httptools (0.5.0)
#0 9.408   • Installing lxml (4.9.2)
#0 10.04   • Installing markupsafe (2.1.1)
#0 10.52   • Installing packaging (22.0)
#0 11.48   • Installing pluggy (1.0.0)
#0 13.67   • Installing prompt-toolkit (3.0.36)
#0 13.87   • Installing pyasn1 (0.4.8)
#0 13.92   • Installing pydantic (1.10.2)
#0 13.95   • Installing python-dotenv (0.21.0)
#0 14.40   • Installing pytz (2022.6)
#0 15.09   • Installing pyyaml (6.0)
#0 15.09   • Installing requests (2.28.1)
#0 16.68   • Updating setuptools (58.1.0 -> 65.6.3)
#0 17.80   • Installing six (1.16.0)
#0 18.40   • Installing starlette (0.22.0)
#0 19.65   • Installing tomli (2.0.1)
#0 19.72   • Installing uvloop (0.17.0)
#0 19.93   • Installing watchgod (0.8.2)
#0 20.36   • Installing websockets (10.4)
#0 23.49   • Installing bcrypt (4.0.1)
#0 23.51   • Installing billiard (3.6.4.0)
#0 23.51   • Installing chardet (5.1.0)
#0 23.51   • Installing click-didyoumean (0.3.0)
#0 23.51   • Installing click-plugins (1.1.1)
#0 23.52   • Installing click-repl (0.2.0)
#0 23.52   • Installing coverage (6.5.0)
#0 23.52   • Installing cryptography (38.0.4)
#0 27.73   • Installing dnspython (2.2.1)
#0 27.86   • Installing ecdsa (0.18.0)
#0 27.91   • Installing fastapi (0.88.0)
#0 28.41   • Installing gunicorn (20.1.0)
#0 28.54   • Installing httpcore (0.16.2)
#0 29.06   • Installing kombu (5.2.4)
#0 29.24   • Installing mako (1.2.4)
#0 30.46   • Installing mccabe (0.7.0)
#0 32.90   • Installing mypy-extensions (0.4.3)
#0 33.62   • Installing neo4j-driver (4.3.6)
#0 34.08   • Installing neobolt (1.7.17)
#0 34.09   • Installing pathspec (0.10.3)
#0 34.49   • Installing platformdirs (2.6.0)
#0 37.37   • Installing premailer (3.10.0)
#0 37.69   • Installing psycopg2-binary (2.9.5)
#0 38.09   • Installing pycodestyle (2.10.0)
#0 38.83   • Installing pyflakes (3.0.1)
#0 39.50   • Installing pytest (7.2.0)
#0 40.08   • Installing python-dateutil (2.8.2)
#0 41.08   • Installing rfc3986 (1.5.0)
#0 42.26   • Installing rsa (4.9)
#0 42.71   • Installing shapely (1.7.1)
#0 45.01   • Installing sqlalchemy (1.4.45)
#0 45.04   • Installing uvicorn (0.17.6)
#0 55.46 
#0 55.46   CalledProcessError
#0 55.46 
#0 55.46   Command '['/usr/local/bin/python3.9', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/usr/local', '--no-deps', '/root/.cache/pypoetry/artifacts/a3/87/7e/624f3c03cf53f002423bb5de2a949525887c473c12c523741db0e80fb6/Shapely-1.7.1.tar.gz']' returned non-zero exit status 1.
#0 55.46 
#0 55.46   at /usr/local/lib/python3.9/subprocess.py:528 in run
#0 55.63        524│             # We don't call process.wait() as .__exit__ does that for us.
#0 55.63        525│             raise
#0 55.63        526│         retcode = process.poll()
#0 55.63        527│         if check and retcode:
#0 55.63     →  528│             raise CalledProcessError(retcode, process.args,
#0 55.63        529│                                      output=stdout, stderr=stderr)
#0 55.64        530│     return CompletedProcess(process.args, retcode, stdout, stderr)
#0 55.64        531│ 
#0 55.64        532│ 
#0 55.64 
#0 55.64 The following error occurred when trying to handle this error:
#0 55.64 
#0 55.64 
#0 55.64   EnvCommandError
#0 55.64 
#0 55.64   Command ['/usr/local/bin/python3.9', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/usr/local', '--no-deps', '/root/.cache/pypoetry/artifacts/a3/87/7e/624f3c03cf53f002423bb5de2a949525887c473c12c523741db0e80fb6/Shapely-1.7.1.tar.gz'] errored with the following return code 1, and output: 
#0 55.64   Processing /root/.cache/pypoetry/artifacts/a3/87/7e/624f3c03cf53f002423bb5de2a949525887c473c12c523741db0e80fb6/Shapely-1.7.1.tar.gz
#0 55.64     Installing build dependencies: started
#0 55.64     Installing build dependencies: finished with status 'done'
#0 55.64     Getting requirements to build wheel: started
#0 55.64     Getting requirements to build wheel: finished with status 'error'
#0 55.64     error: subprocess-exited-with-error
#0 55.64     
#0 55.64     × Getting requirements to build wheel did not run successfully.
#0 55.64     │ exit code: 1
#0 55.64     ╰─> [23 lines of output]
#0 55.64         Failed `CDLL(libgeos_c.so.1)`
#0 55.64         Failed `CDLL(libgeos_c.so)`
#0 55.64         Traceback (most recent call last):
#0 55.64           File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
#0 55.64             main()
#0 55.64           File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
#0 55.64             json_out['return_val'] = hook(**hook_input['kwargs'])
#0 55.64           File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
#0 55.64             return hook(config_settings)
#0 55.64           File "/tmp/pip-build-env-0u4intvk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
#0 55.64             return self._get_build_requires(config_settings, requirements=['wheel'])
#0 55.64           File "/tmp/pip-build-env-0u4intvk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
#0 55.64             self.run_setup()
#0 55.64           File "/tmp/pip-build-env-0u4intvk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 484, in run_setup
#0 55.64             super(_BuildMetaLegacyBackend,
#0 55.64           File "/tmp/pip-build-env-0u4intvk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 335, in run_setup
#0 55.64             exec(code, locals())
#0 55.64           File "<string>", line 85, in <module>
#0 55.64           File "/tmp/pip-req-build-w65g7_04/shapely/_buildcfg.py", line 169, in <module>
#0 55.64             lgeos = load_dll('geos_c',
#0 55.64           File "/tmp/pip-req-build-w65g7_04/shapely/_buildcfg.py", line 162, in load_dll
#0 55.64             raise OSError(
#0 55.64         OSError: Could not find library geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so']
#0 55.64         [end of output]
#0 55.64     
#0 55.64     note: This error originates from a subprocess, and is likely not a problem with pip.
#0 55.64   error: subprocess-exited-with-error
#0 55.64   
#0 55.64   × Getting requirements to build wheel did not run successfully.
#0 55.64   │ exit code: 1
#0 55.64   ╰─> See above for output.
#0 55.64   
#0 55.64   note: This error originates from a subprocess, and is likely not a problem with pip.
#0 55.64   
#0 55.64 
#0 55.64   at /opt/poetry/venv/lib/python3.9/site-packages/poetry/utils/env.py:1540 in _run
#0 55.75       1536│                 output = subprocess.check_output(
#0 55.75       1537│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
#0 55.75       1538│                 )
#0 55.75       1539│         except CalledProcessError as e:
#0 55.75     → 1540│             raise EnvCommandError(e, input=input_)
#0 55.75       1541│ 
#0 55.75       1542│         return decode(output)
#0 55.75       1543│ 
#0 55.75       1544│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:
#0 55.75 
#0 55.75 The following error occurred when trying to handle this error:
#0 55.75 
#0 55.75 
#0 55.75   PoetryException
#0 55.75 
#0 55.75   Failed to install /root/.cache/pypoetry/artifacts/a3/87/7e/624f3c03cf53f002423bb5de2a949525887c473c12c523741db0e80fb6/Shapely-1.7.1.tar.gz
#0 55.75 
#0 55.75   at /opt/poetry/venv/lib/python3.9/site-packages/poetry/utils/pip.py:58 in pip_install
#0 55.76        54│ 
#0 55.76        55│     try:
#0 55.76        56│         return environment.run_pip(*args)
#0 55.76        57│     except EnvCommandError as e:
#0 55.76     →  58│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
#0 55.76        59│ 
#0 55.76 
------
failed to solve: executor failed running [/bin/sh -c bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --no-dev ; fi"]: exit code: 1

MacOS 13.1

@Mocha-L
Copy link

Mocha-L commented Jan 15, 2023

u need add the following code before poetry install in backend/celeryworker.dockerfileandbackend/backend.dockerfile

RUN apt-get update && apt-get install -y libgeos-dev

@valsha

@turukawa
Copy link
Member

@valsha I'm not duplicating this error. Are you adding libgeos as an additional dependency for your project?

@turukawa
Copy link
Member

Right, I've tracked it down. neomodel needs shapely and shapely needs libgeos. I'll update the scripts.

turukawa added a commit that referenced this issue Jan 27, 2023
`libgeos` is a dependency `shapely` which is a dependency for `neomodel`, and which doesn't appear to be installed correctly on Macs.
Reference: #4, from @valsha and @Mocha-L
@turukawa
Copy link
Member

Release 0.7.1 should fix this.

echocraft201315 added a commit to echocraft201315/fastAPI-mongoDB that referenced this issue Mar 27, 2025
`libgeos` is a dependency `shapely` which is a dependency for `neomodel`, and which doesn't appear to be installed correctly on Macs.
Reference: whythawk/full-stack-fastapi-postgresql#4, from @valsha and @Mocha-L
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants