I came up with the code to upload my shapefile to PostGIS table. However, my Linux system is not able to install the GeoPandas module. I tried a lot of procedures but no result. So, is there any alternative for gpd.read_file(shp_file_path) ?

polydf = gpd.read_file(shp_file_path)
polydf.to_postgis('table_name', engine, schema='public', if_exists='append', index=True, index_label='Index')
  • @BERA do have gdal, if that's what u mean Nov 23 '21 at 11:16
  • @BERA Actually I want to use python for this purpose. Can you suggest something for that ? Nov 24 '21 at 6:39
  • 1
    Pick one of those procedures and provide details of your attempt.
    – Vince
    Nov 24 '21 at 12:46
  • You are asking for an alternative for reading a shape into python and write the results to postgis?
    – BERA
    Nov 24 '21 at 12:58
  • @BERA Yes that is what I am required to do. My python environment is not able to read GeoPandas package. Nov 25 '21 at 4:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.