Error with shapely

Problem description:

Traceback (most recent call last):
  File "", line 15, in <module>
    from shapely.geometry import LineString
  File "/home/runner/hanoi-4-disk-step-ion/venv/lib/python3.8/site-packages/shapely/geometry/", line 4, in <module>
    from .base import CAP_STYLE, JOIN_STYLE
  File "/home/runner/hanoi-4-disk-step-ion/venv/lib/python3.8/site-packages/shapely/geometry/", line 20, in <module>
    from shapely.coords import CoordinateSequence
  File "/home/runner/hanoi-4-disk-step-ion/venv/lib/python3.8/site-packages/shapely/", line 10, in <module>
    from shapely.geos import lgeos
  File "/home/runner/hanoi-4-disk-step-ion/venv/lib/python3.8/site-packages/shapely/", line 83, in <module>
  File "/nix/store/5g6y3nzq80fkq54ahan2slc57j6327nj-python3-3.8.15/lib/python3.8/ctypes/", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: cannot open shared object file: No such file or directory

Repl link:

Install the libstdc++ package since it says there’s no such file or directory

Or create a requirements.txt with Shapely==1.7.1 in it to see if it resolve the errors

1 Like

NO use :
requirements.txt with Shapely==1.7.1

Please tell me how to Install the libstdc++ package

you can try setting the LD_LIBRARY_PATH environment variable to include the directory where the library is located. Assuming the library is in the /usr/lib directory

this command would do that, (had to look it up)

1 Like

export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH

where I put above environment variable ?

Thank you.
It works.

Oh, shoot, i’m sorry I didn’t respond, I fell asleep ;-; and forgot about the post in the morning/ I’m glad it works though.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.