poetry2nix icon indicating copy to clipboard operation
poetry2nix copied to clipboard

importing shapely.geos fails "OSError: libstdc++.so.6: cannot open shared object file: No such file or directory"

Open PAI5REECHO opened this issue 3 years ago • 1 comments

>>> from shapely.geos import leos
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/me/projects/q3/.venv/lib/python3.10/site-packages/shapely/geos.py", line 83, in <module>
    CDLL(geos_whl_so[0])
  File "/nix/store/40n9pd613v8fc3x39yjrgs1i7d4q8yl0-python3-3.10.4/lib/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libstdc++.so.6: cannot open shared object file: No such file or directory

https://github.com/nix-community/poetry2nix/blob/3b01c3e3dc57d511848d8433153ab67db79640e1/overrides/default.nix#L1892-L1904 The provided overrides for shapely don't fix this

PAI5REECHO avatar Jun 03 '22 15:06 PAI5REECHO

Hi, I got this error:

       last 10 log lines:
       > Using pythonImportsCheckPhase
       > Sourcing python-namespaces-hook
       > unpacking sources
       > Executing wheelUnpackPhase
       > Finished executing wheelUnpackPhase
       > patching sources
       > Traceback (most recent call last):
       >   File "/nix/store/jz8gvh7m73dnkp81df1yjmmdgl3jj2hy-shapely-rewrite.py", line 12, in <module>
       >     with open(sys.argv[1]) as f:
       > FileNotFoundError: [Errno 2] No such file or directory: 'shapely/geos.py'

I think shapely already fixed the path in the newest release 1.8.3, so the patch is not needed

sandangel avatar Jun 23 '22 14:06 sandangel