{"title":"Suiteáil GeodJango","version":"5.2","locale":"ga","docname":"ref/contrib/gis/install/index","url":"/ga/5.2/ref/contrib/gis/install/","canonical":"https://djangodocs.dev/ga/5.2/ref/contrib/gis/install/","summary":"Go ginearálta, éilíonn suiteáil GeodJango: <django>:ref: `Python agus Django `; Bunachar sonraí spásúil; Leabharlanna Geospásúla a.","html":"<h1>Suiteáil GeodJango<a class=\"heading-anchor\" href=\"#geodjango-installation\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<section id=\"overview\">\n<h2>Forbhreathnú<a class=\"heading-anchor\" href=\"#overview\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Go ginearálta, éilíonn suiteáil GeodJango:</p>\n<ol class=\"arabic simple\">\n<li><p>&lt;django&gt;:ref: <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>Python agus Django `</p></li>\n<li><p><a class=\"reference internal\" href=\"#spatial-database\"><span class=\"std std-ref\">Bunachar sonraí spásúil</span></a></p></li>\n<li><p><a class=\"reference internal\" href=\"/ga/5.2/ref/contrib/gis/install/geolibs/\"><span class=\"doc\">Leabharlanna Geospásúla a</span></a></p></li>\n</ol>\n<p>Cuirtear sonraí maidir le gach ceann de na riachtanais agus na treoracha suiteála ar fáil sna hailt thíos. Ina theannta sin, tá treoracha ardán-shonracha ar fáil do:</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#macos\"><span class=\"std std-ref\">macOS</span></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#windows\"><span class=\"std std-ref\">Fuinneoga</span></a></p></li>\n</ul>\n<aside class=\"admonition-use-the-source admonition\" role=\"note\">\n<p class=\"admonition-title\">Úsáid an Foinse</p>\n<p>Toisc go mbaineann GeodJango leas as an teicneolaíocht bogearraí geospásúla foinse oscailte is déanaí, tá leaganacha le déanaí de na leabharlanna riachtanach. Mura bhfuil pacáistí dénártha ar fáil do d'ardán, d'fhéadfadh go mbeadh gá le suiteáil ón bhfoinse. Agus na leabharlanna á thiomsú agat ó fhoinse, lean na treoracha go dlúth, go háirithe más tosaitheoir tú.</p>\n</aside>\n</section>\n<section id=\"requirements\">\n<h2>Riachtanais<a class=\"heading-anchor\" href=\"#requirements\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<section id=\"python-and-django\">\n<span id=\"django\"></span><h3>Python agus Django<a class=\"heading-anchor\" href=\"#python-and-django\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>&lt;installing-official-release&gt;Toisc go bhfuil GeodJango san áireamh le Django, féach le do thoil Django's:ref: <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>treoracha suiteála <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`</span></a>le haghaidh sonraí maidir le conas a shuiteáil.</p>\n</section>\n<section id=\"spatial-database\">\n<span id=\"id1\"></span><h3>Bunachar sonraí spásúil<a class=\"heading-anchor\" href=\"#spatial-database\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Is iad PostgreSQL (le PostGIS), MySQL, Oracle, agus SQLite (le SpatiaLite) na bunachair sonraí spásúla a dtacaítear leo faoi láthair.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">Note</p>\n<p>Moltar PostGIS, toisc gurb é an bunachar sonraí spásúil foinse oscailte is aibí agus is saibhir i ngnéithe é.</p>\n</aside>\n<p>Braitheann na leabharlanna geospásúla a theastaíonn le haghaidh suiteáil GeodJango ar an mbunachar sonraí spásúil a úsáidtear. Liostaíonn an méid seo a leanas na riachtanais leabharlainne, leaganacha tacaithe, agus aon nótaí do gach ceann de na cúltaca bunachar sonraí tacaithe:</p>\n<div class=\"table-scroll\" role=\"region\" tabindex=\"0\" aria-label=\"Table\"><table class=\"docutils align-default\">\n<thead>\n<tr class=\"row-odd\"><th class=\"head\"><p>Bunachar Sonraí</p></th>\n<th class=\"head\"><p>Ceanglais Leabharlan</p></th>\n<th class=\"head\"><p>Leaganacha Tacaithe</p></th>\n<th class=\"head\"><p>Nótaí</p></th>\n</tr>\n</thead>\n<tbody>\n<tr class=\"row-even\"><td><p>PostgreSQL</p></td>\n<td><p>GEOS, GDAL, PROJ, PostGIS</p></td>\n<td><p>14+</p></td>\n<td><p>Éilíonn PostGIS.</p></td>\n</tr>\n<tr class=\"row-odd\"><td><p>MySQL</p></td>\n<td><p>GEOS, GDAL</p></td>\n<td><p>8.0.11+</p></td>\n<td><p>&lt;mysql-spatial-limitations&gt;:ref: <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>Feidhmiúlacht theoranta <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`</span></a>.</p></td>\n</tr>\n<tr class=\"row-even\"><td><p>Oracle</p></td>\n<td><p>GEOS, GDAL</p></td>\n<td><p>19+</p></td>\n<td><p>Ní thacaítear le XE.</p></td>\n</tr>\n<tr class=\"row-odd\"><td><p>SQLite</p></td>\n<td><p>GEOS, GDAL, PROJ, SPATALITE</p></td>\n<td><p>3.31+</p></td>\n<td><p>Éilíonn Spatialite 4.3+</p></td>\n</tr>\n</tbody>\n</table>\n</div>\n<p>Féach freisin <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>an maitrís chomparáide seo <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`</span></a>__ ar an OSGeo Wiki le haghaidh teaglaim féideartha PostgreSQL/PostGIS/Geos/GDal.</p>\n</section>\n</section>\n<section id=\"installation\">\n<h2>Suiteáil<a class=\"heading-anchor\" href=\"#installation\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<section id=\"geospatial-libraries\">\n<h3>Leabharlanna geospásúla<a class=\"heading-anchor\" href=\"#geospatial-libraries\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<div class=\"toctree-wrapper compound\">\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"/ga/5.2/ref/contrib/gis/install/geolibs/\">Leabharlanna Geospásúla a</a></li>\n</ul>\n</div>\n</section>\n<section id=\"database-installation\">\n<h3>Suiteáil bunachar sonraí<a class=\"heading-anchor\" href=\"#database-installation\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<div class=\"toctree-wrapper compound\">\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"/ga/5.2/ref/contrib/gis/install/postgis/\">PostGIS a shuiteáil</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"/ga/5.2/ref/contrib/gis/install/spatialite/\">Suiteáil SpatiaLite</a></li>\n</ul>\n</div>\n</section>\n<section id=\"databases-configuration\">\n<h3><a class=\"reference internal\" href=\"/ga/5.2/ref/settings/#std-setting-DATABASES\"><code class=\"xref std std-setting docutils literal notranslate\">DATABASES</code></a> configuration<a class=\"heading-anchor\" href=\"#databases-configuration\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>&lt;spatial-backends&gt;Socraigh an socrú: socrú: INNEALL &lt;DATABASE-ENGINE&gt;`go ceann de na: ref: `cúltaca spásúla.</p>\n</section>\n<section id=\"add-django-contrib-gis-to-installed-apps\">\n<h3>Cuir <code class=\"docutils literal notranslate\">django.contrib.gis</code> chuig: socrú: INSTALLED_APPS<a class=\"heading-anchor\" href=\"#add-django-contrib-gis-to-installed-apps\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Cosúil le feidhmchláir contrib Django eile, ní mór duit* amháin a chur leis: mod: django.contrib.gis chuig: setting: INSTALLED_APPS i do shocruithe. Tá sé seo ionas gur féidir na teimpléid <code class=\"docutils literal notranslate\">gis</code> a shuíomh - mura ndéantar iad, ansin ní fheidhmeoidh gnéithe mar an riarachán geografach nó léarscáileanna láithreáin KML i gceart.</p>\n</section>\n</section>\n<section id=\"troubleshooting\">\n<h2>Fabhtcheartú<a class=\"heading-anchor\" href=\"#troubleshooting\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Mura féidir leat an réiteach ar do fhadhb a fháil anseo ansin páirt sa phobal! Is féidir leat:</p>\n<ul class=\"simple\">\n<li><p>Cuir do cheist ar an bhfóram <a href=\"#id23\"><span class=\"problematic\" id=\"id24\">`GeodJango`__</span></a>.</p></li>\n<li><p>Comhdaigh ticéad ar an <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>rian Django <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`</span></a>__ má cheapann tú go bhfuil fabht ann. Déan cinnte cur síos iomlán a sholáthar ar an bhfadhb, leaganacha a úsáidtear, agus sonraigh an chomhpháirt mar “GIS”.</p></li>\n</ul>\n<section id=\"library-environment-settings\">\n<span id=\"libsettings\"></span><h3>Socruithe timpeallachta leabhar<a class=\"heading-anchor\" href=\"#library-environment-settings\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Go fada, is é an fhadhb is coitianta agus GeodJango á shuiteáil ná nach féidir na leabharlanna roinnte seachtracha (m.sh., do GEOS agus GDAL) a lonnú. [#] _ De ghnáth, is é cúis leis an bhfadhb seo ná nach bhfuil an córas oibriúcháin ar an eolaire ina suiteáilíodh na leabharlanna tógtha ó fhoinse.</p>\n<p>Go ginearálta, féadfar cosán an leabharlainne a shocrú ar bhonn in aghaidh an úsáideora trí athróg comhshaoil a shocrú, nó trí chonair an leabharlainne a chumrú don chóras iomlán.</p>\n<section id=\"ld-library-path-environment-variable\">\n<h4>Athróg comhshaoil <code class=\"docutils literal notranslate\">LD_LIBRARY_PATH</code><a class=\"heading-anchor\" href=\"#ld-library-path-environment-variable\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Féadfaidh úsáideoir an t-athróg comhshaoil seo a shocrú chun na cosáin leabharlainne is mian leo a úsáid a shaincheapadh Is é <code class=\"docutils literal notranslate\">/usr/local/lib</code> an eolaire leabharlainne tipiciúil do bhogearraí a tógadh ó fhoinse. Dá bhrí sin, ní mór <code class=\"docutils literal notranslate\">/usr/local/lib</code> a áireamh san athróg <code class=\"docutils literal notranslate\">LD_LIBRARY_PATH</code>. Mar shampla, d'fhéadfadh an t-úsáideoir na rudaí seo a leanas a chur ina bpróifíl bash:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code><span class=\"nb\">export</span> <span class=\"nv\">LD_LIBRARY_PATH</span><span class=\"o\">=</span>/usr/local/lib\n</code></pre></div>\n</section>\n<section id=\"setting-system-library-path\">\n<h4>Cosán leabharlainne córais a shocrú<a class=\"heading-anchor\" href=\"#setting-system-library-path\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Ar chórais GNU/Linux, de ghnáth bíonn comhad ann i <code class=\"docutils literal notranslate\">/etc/ld.so.conf</code>, a d'fhéadfadh cosáin bhreise a áireamh ó chomhaid in eolaire eile, mar shampla <code class=\"docutils literal notranslate\">/etc/ld.so.conf.d</code>. Mar úsáideoir fréimhe, cuir an cosán leabharlainne saincheaptha (cosúil le <code class=\"docutils literal notranslate\">/usr/local/lib</code>) ar líne nua i ld.so.conf`. Seo* sampla aon* de conas é sin a dhéanamh:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$ sudo <span class=\"nb\">echo</span> /usr/local/lib &gt;&gt; /etc/ld.so.conf\n$ sudo ldconfig\n</code></pre></div>\n<p>Maidir le húsáideoirí OpenSolaris, féadfar cosán leabharlainne an chórais a mhodhnú ag baint úsáide as an bhfóntais <code class=\"docutils literal notranslate\">crle</code>. Rith <code class=\"docutils literal notranslate\">crle</code> gan aon roghanna chun an chumraíocht reatha a fheiceáil agus bain úsáid as <code class=\"docutils literal notranslate\">crle -l</code> chun socrú leis an gcosán leabharlainne nua. Bí * mór* cúramach agus cosán leabharlainne an chórais á mhodhnú agat:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code><span class=\"c1\"># crle -l $OLD_PATH:/usr/local/lib</span>\n</code></pre></div>\n</section>\n<section id=\"install-binutils\">\n<span id=\"binutils\"></span><h4>Suiteáil <code class=\"docutils literal notranslate\">binutils</code><a class=\"heading-anchor\" href=\"#install-binutils\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Úsáideann GeodJango an fheidhm <code class=\"docutils literal notranslate\">find_library</code> (ón modúl Python <code class=\"docutils literal notranslate\">ctypes.util</code>) chun leabharlanna a fháil amach. Úsáideann gnáthamh <code class=\"docutils literal notranslate\">find_library</code> clár ar a dtugtar <code class=\"docutils literal notranslate\">objdump</code> (cuid den phacáiste <code class=\"docutils literal notranslate\">binutils</code>) chun leabharlann roinnte ar chórais GNU/Linux a fhíorú. Dá bhrí sin, mura bhfuil binutils suiteáilte ar do chóras Linux ansin b'fhéidir nach mbeidh ctypes Python in ann do leabharlann a aimsiú fiú má tá do chosán leabharlainne socraithe i gceart agus tógadh leabharlanna geospásúla go foirfe.</p>\n<p>Is féidir an pacáiste <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">``</span></a>binutils` a shuiteáil ar chórais Debian agus Ubuntu ag baint úsáide as an ordú seo a leanas:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$ sudo apt-get install binutils\n</code></pre></div>\n<p>Ar an gcaoi chéanna, ar chórais Red Hat agus CentOS:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$ sudo yum install binutils\n</code></pre></div>\n</section>\n</section>\n</section>\n<section id=\"platform-specific-instructions\">\n<h2>Treoracha sonracha don ardán<a class=\"heading-anchor\" href=\"#platform-specific-instructions\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<section id=\"macos\">\n<span id=\"id6\"></span><h3>macOS<a class=\"heading-anchor\" href=\"#macos\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Mar gheall ar an éagsúlacht na gcóras pacáistithe atá ar fáil do MacOS, tá roinnt roghanna éagsúla ag úsáideoirí chun GeodJango a shuiteáil. Is iad na roghanna seo:</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"#postgresapp\"><span class=\"std std-ref\">Postgres.app</span></a> (easiest and recommended)</p></li>\n<li><p><a class=\"reference internal\" href=\"#homebrew\"><span class=\"std std-ref\">Bailebrew</span></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#fink\"><span class=\"std std-ref\">Fink</span></a></p></li>\n<li><p><a class=\"reference internal\" href=\"#macports\"><span class=\"std std-ref\">MacPorts</span></a></p></li>\n<li><p><a class=\"reference internal\" href=\"/ga/5.2/ref/contrib/gis/install/geolibs/#build-from-source\"><span class=\"std std-ref\">Tógáil ó fhoinse</span></a></p></li>\n</ul>\n<p>Cuimsíonn an chuid seo treoracha freisin maidir le leagan uasghrádaithe de:ref: macos_python a shuiteáil ó phacáistí a sholáthraíonn Fondúireacht Bogearraí Python, áfach, níl sé seo ag teastáil.</p>\n<section id=\"python\">\n<span id=\"macos-python\"></span><h4>Python<a class=\"heading-anchor\" href=\"#python\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Cé go dtagann MacOS le Python suiteáilte, is féidir le húsáideoirí <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>suiteálaithe creat <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`</span></a>__ a sholáthraíonn Fondúireacht Bogearraí Python a úsáid. Buntáiste a bhaineann leis an suiteálaí a úsáid ná go bhfanfaidh Python MacOS “pristine” le húsáid an chórais oibriúcháin inmheánach.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">Note</p>\n<p>Beidh ort an t-athróg timpeallachta <code class=\"docutils literal notranslate\">PATH</code> a mhodhnú i do chomhad <code class=\"docutils literal notranslate\">.profile</code> ionas go n-úsáidfear an leagan nua de Python nuair a iontráiltear <code class=\"docutils literal notranslate\">python</code> ag an líne ordaithe:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code><span class=\"nb\">export</span> <span class=\"nv\">PATH</span><span class=\"o\">=</span>/Library/Frameworks/Python.framework/Versions/Current/bin:<span class=\"nv\">$PATH</span>\n</code></pre></div>\n</aside>\n</section>\n<section id=\"postgres-app\">\n<span id=\"postgresapp\"></span><h4>Postgres.app<a class=\"heading-anchor\" href=\"#postgres-app\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Is freastalaí neamhspleách PostgreSQL é <a class=\"reference internal\" href=\"#id8\">Postgres.app</a> &lt; <a class=\"reference external\" href=\"https://postgresapp.com/\">https://postgresapp.com/</a>&gt; a chuimsíonn an síneadh PostGIS. Beidh ort freisin <code class=\"docutils literal notranslate\">gdal</code> agus <code class=\"docutils literal notranslate\">libgeoip</code> a shuiteáil le:ref: homebrew.</p>\n<p>Tar éis Postgres.app a shuiteáil, cuir an méid seo a leanas le do .bash_profile` ionas gur féidir leat cláir an phacáiste a reáchtáil ón líne ordaithe. Cuir leagan PostgreSQL in ionad X.Y` sa Postgres.app a shuiteáil tú:</p>\n<div class=\"code-block\" data-language=\"bash\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code><span class=\"nb\">export</span> <span class=\"nv\">PATH</span><span class=\"o\">=</span><span class=\"nv\">$PATH</span>:/Applications/Postgres.app/Contents/Versions/X.Y/bin\n</code></pre></div>\n<p>Is féidir leat a sheiceáil an bhfuil an cosán curtha ar bun i gceart trí chlóscríobh <code class=\"docutils literal notranslate\">which psql</code> ag pras críochfoirt.</p>\n</section>\n<section id=\"homebrew\">\n<span id=\"id9\"></span><h4>Bailebrew<a class=\"heading-anchor\" href=\"#homebrew\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Soláthraíonn <a href=\"#id23\"><span class=\"problematic\" id=\"id25\">`Homebrew`__</span></a> “oidis” chun dénártha agus pacáistí a thógáil ón bhfoinse. Soláthraíonn sé oidis do na réamhriachtanais GeodJango ar ríomhairí Macintosh atá ag rith macOS. Toisc go dtógann Homebrew na bogearraí ó fhoinse fós, tá <a class=\"reference external\" href=\"https://developer.apple.com/xcode/\">Xcode</a> ag teastáil.</p>\n<p>Achoimre:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$ brew install postgresql\n$ brew install postgis\n$ brew install gdal\n$ brew install libgeoip\n</code></pre></div>\n<section id=\"fink\">\n<span id=\"id11\"></span><h5>Fink<a class=\"heading-anchor\" href=\"#fink\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h5>\n<p>Bhí <a href=\"#id23\"><span class=\"problematic\" id=\"id26\">`Kurt Schwehr`__</span></a> grásta go leor chun pacáistí GeodJango a chruthú d'úsáideoirí an chórais pacáiste <a href=\"#id23\"><span class=\"problematic\" id=\"id27\">`Fink`__</span></a>. Tá pacáistí éagsúla ar fáil `__ (ag tosú le ``django-gis`), ag brath ar an leagan de Python is mian leat a úsáid.</p>\n</section>\n</section>\n<section id=\"macports\">\n<span id=\"id15\"></span><h4>MacPorts<a class=\"heading-anchor\" href=\"#macports\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Is féidir <a class=\"reference external\" href=\"https://developer.apple.com/xcode/\">MacPorts `__ a úsáid chun réamhriachtanais GeodJango a shuiteáil ar ríomhairí atá ag rith macOS. Toisc go dtógann MacPorts na bogearraí ó fhoinse fós, tá `Xcode</a> ag teastáil.</p>\n<p>Achoimre:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$ sudo port install postgresql14-server\n$ sudo port install geos\n$ sudo port install proj6\n$ sudo port install postgis3\n$ sudo port install gdal\n$ sudo port install libgeoip\n</code></pre></div>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">Note</p>\n<p>Beidh ort freisin an PATH` a mhodhnú i do .profile` ionas go mbeidh na cláir MacPorts inrochtana ón líne ordaithe:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code><span class=\"nb\">export</span> <span class=\"nv\">PATH</span><span class=\"o\">=</span>/opt/local/bin:/opt/local/lib/postgresql14/bin\n</code></pre></div>\n<p>Ina theannta sin, cuir an socrú <code class=\"docutils literal notranslate\">DYLD_FALLBACK_LIBRARY_PATH</code> ionas gur féidir Python na leabharlanna a fháil:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code><span class=\"nb\">export</span> <span class=\"nv\">DYLD_FALLBACK_LIBRARY_PATH</span><span class=\"o\">=</span>/opt/local/lib:/opt/local/lib/postgresql14\n</code></pre></div>\n</aside>\n</section>\n</section>\n<section id=\"windows\">\n<span id=\"id17\"></span><h3>Fuinneoga<a class=\"heading-anchor\" href=\"#windows\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Lean ar aghaidh tríd na codanna seo a leanas go seicheamhach d'fhonn GeodJango a shuiteáil ar Windows. Sa rang teagaisc seo, suiteálfaimid leaganacha 64 giotán de gach feidhmchlár.</p>\n<section id=\"id18\">\n<h4>Python<a class=\"heading-anchor\" href=\"#id18\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Suiteáil leagan 64 giotán de Python. Féach: Doc: Suiteáil Python le haghaidh tuilleadh faisnéise &lt;/howto/windows&gt;.</p>\n</section>\n<section id=\"postgresql\">\n<h4>PostgreSQL<a class=\"heading-anchor\" href=\"#postgresql\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Íoslódáil an suiteálaí <a href=\"#id23\"><span class=\"problematic\" id=\"id28\">`PostgreSQL 15.x `__ is déanaí ó shuíomh Gréasáin `EnterprisedB`__</span></a>. Tar éis duit a íoslódáil, rith an suiteálaí, lean na treoracha ar an scáileán, agus coinnigh na roghanna réamhshocraithe mura bhfuil a fhios agat na hiarmhairtí</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">Note</p>\n<p>Cruthaíonn suiteálaí PostgreSQL sárúsáideoir bunachar sonraí nua <code class=\"docutils literal notranslate\">postgres</code> spreagfar ort uair amháin an pasfhocal a shocrú - déan cinnte cuimhneamh air!</p>\n</aside>\n<p>Nuair a chríochnaíonn an suiteálaí, iarrfaidh sé “Seoladh Tógálaí Stack ag imeacht?” - coinnigh é seo a sheiceáil, mar is gá a shuiteáil:ref: postgisasb.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">Note</p>\n<p>Má tá sé suiteáilte go rathúil, rithfidh an freastalaí PostgreSQL sa chúlra gach uair a thosaigh an córas mar sheirbhís Windows. A: MenusElection: Cruthóidh grúpa roghchlár tosaigh PostgreSQL 15 agus beidh aicearraí ann don Tógálaí Staca Feidhmchláir (ASB) chomh maith leis an 'SQL Shell', a sheolfaidh fuinneog ordaithe <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">``</span></a>psql <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">``</span></a>.</p>\n</aside>\n</section>\n<section id=\"postgis\">\n<span id=\"postgisasb\"></span><h4>PostGIS<a class=\"heading-anchor\" href=\"#postgis\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Ón taobh istigh den Tógálaí Stack (chun rith lasmuigh den suiteálaí, :menuselection: Start --&gt; PostgreSQL 15 --&gt; Tógálaí Stack Iarrataire), roghnaigh: menuselection: PostgreSQL 15 (x64) ar chalafort 5432 ón roghchlár anuas agus cliceáil ar aghaidh. Leathnaigh an crann roghchláir: menuselection: Catagóirí --&gt; Síneadh spásúil agus roghnaigh: menuselection: PostGIS X.Y do PostgreSQL 15.</p>\n<p>Tar éis duit cliceáil ar aghaidh, cuirfear ort an pacáiste roghnaithe a dhearbhú agus “Íoslódáil eolaire”. Cliceáil ar aghaidh arís, íoslódóidh sé seo PostGIS agus iarrfar ort cliceáil in aice le suiteálaí PostGIS a thosú. Roghnaigh na roghanna réamhshocraithe le linn suite Cuimsíonn an próiseas suiteála ceithre bhosca dialóige Tai/Níl, is é “Níl” an rogha réamhshocraithe do gach ceathrar.</p>\n</section>\n<section id=\"osgeo4w\">\n<span id=\"id21\"></span><h4>OSGeo4w<a class=\"heading-anchor\" href=\"#osgeo4w\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Cuidíonn an suiteálaí OSGeo4W `_ leis na leabharlanna PROJ, GDAL, agus GEOS a theastaíonn ag GeoDjango a shuiteáil. Ar dtús, íoslódáil an `suiteálaí OSGeo4w `_, agus rith é. Roghnaigh: MenusElection: `Express Web-GIS Install agus cliceáil ar aghaidh. Sa liosta 'Roghnaigh Pacáistí', cinntigh go roghnaítear GDAL. Má chumasaítear aon phacáistí eile de réir réamhshocraithe, ní theastaíonn GeodJango iad agus féadfar iad a dhísheiceáil go sábháilte. Tar éis duit cliceáil eile agus glacadh leis na comhaontuithe ceadúnais, déanfar na pacáistí a íoslódáil agus a shuiteáil go huathoibríoch, agus ina dhiaidh</p>\n</section>\n<section id=\"modify-windows-environment\">\n<h4>Athraigh timpeallacht Windows<a class=\"heading-anchor\" href=\"#modify-windows-environment\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>D'fhonn GeodJango a úsáid, beidh ort d'eolairí OSGeo4w a chur le do chóras Windows <code class=\"docutils literal notranslate\">Path</code>, chomh maith le hathróga timpeallachta <code class=\"docutils literal notranslate\">GDAL_DATA</code> agus PROJ_LIB` a chruthú. Cuirfidh an tacar orduithe seo a leanas, infheidhmithe le cmd.exe`, é seo ar bun. Athosaigh do ghléas nuair a bheidh sé seo críochnaithe chun athróga nua timpeallachta a aithint:</p>\n<div class=\"code-block\" data-language=\"bat\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Bat</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Bat code\"><code><span class=\"k\">set</span> <span class=\"nv\">OSGEO4W_ROOT</span><span class=\"p\">=</span>C:\\OSGeo4W\n<span class=\"k\">set</span> <span class=\"nv\">GDAL_DATA</span><span class=\"p\">=</span><span class=\"nv\">%OSGEO4W_ROOT%</span>\\apps\\gdal\\share\\gdal\n<span class=\"k\">set</span> <span class=\"nv\">PROJ_LIB</span><span class=\"p\">=</span><span class=\"nv\">%OSGEO4W_ROOT%</span>\\share\\proj\n<span class=\"k\">set</span> <span class=\"nv\">PATH</span><span class=\"p\">=</span><span class=\"nv\">%PATH%</span>;<span class=\"nv\">%OSGEO4W_ROOT%</span>\\bin\nreg ADD <span class=\"s2\">&quot;HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment&quot;</span> /v Path /t REG_EXPAND_SZ /f /d <span class=\"s2\">&quot;</span><span class=\"nv\">%PATH%</span><span class=\"s2\">&quot;</span>\nreg ADD <span class=\"s2\">&quot;HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment&quot;</span> /v GDAL_DATA /t REG_EXPAND_SZ /f /d <span class=\"s2\">&quot;</span><span class=\"nv\">%GDAL_DATA%</span><span class=\"s2\">&quot;</span>\nreg ADD <span class=\"s2\">&quot;HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment&quot;</span> /v PROJ_LIB /t REG_EXPAND_SZ /f /d <span class=\"s2\">&quot;</span><span class=\"nv\">%PROJ_LIB%</span><span class=\"s2\">&quot;</span>\n</code></pre></div>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">Note</p>\n<p>Teastaíonn pribhléidí riarthóra chun na horduithe seo a chur i Chun seo a dhéanamh, reáchtáil pras ordaithe mar riarthóir agus cuir isteach na horduithe thuas. Ní mór duit logáil amach agus logáil isteach arís chun go dtiocfaidh na socruithe i bhfeidhm.</p>\n</aside>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">Note</p>\n<p>Má shaincheapann tú eolairí suiteála OSGeo4w, ansin beidh ort na hathróga OSGEO4W_ROOT` a mhodhnú dá réir.</p>\n</aside>\n</section>\n<section id=\"install-django-and-set-up-database\">\n<h4>Suiteáil Django agus bunachar sonraí a bhunú<a class=\"heading-anchor\" href=\"#install-django-and-set-up-database\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p><a class=\"reference internal\" href=\"/ga/5.2/topics/install/#installing-official-release\"><span class=\"std std-ref\">Install Django</span></a> on your system. It is\nrecommended that you create a <a class=\"reference external\" href=\"https://docs.python.org/3/tutorial/venv.html\" title=\"(in Python v3.14)\"><span class=\"xref std std-doc\">virtual environment</span></a> for each project you create.</p>\n</section>\n<section id=\"psycopg\">\n<h4>Psychopg<a class=\"heading-anchor\" href=\"#psycopg\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Soláthraíonn modúl Python <code class=\"docutils literal notranslate\">psycopg</code> an comhéadan idir Python agus bunachar sonraí PostgreSQL. Is féidir psycopg` a shuiteáil trí phip laistigh de do thimpeallacht fhíorúil Python:</p>\n<div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Windows code\"><code><span class=\"gp\">...\\&gt;</span> py -m pip install psycopg\n</code></pre></div>\n<p class=\"rubric\">Fonótaí</p>\n<aside class=\"footnote-list brackets\">\n<aside class=\"footnote brackets\" id=\"id22\" role=\"doc-footnote\">\n<span class=\"label\"><span class=\"fn-bracket\">[</span><a role=\"doc-backlink\" href=\"#id5\">1</a><span class=\"fn-bracket\">]</span></span>\n<p>Úsáideann GeodJango gnáthamh: func: ~ctypes.util.find_library ó <code class=\"docutils literal notranslate\">ctypes.util</code> chun leabharlanna roinnte a aimsiú.</p>\n</aside>\n</aside>\n</section>\n</section>\n</section>","rootId":"geodjango-installation","toc":[{"title":"Forbhreathnú","anchor":"overview","children":[]},{"title":"Riachtanais","anchor":"requirements","children":[{"title":"Python agus Django","anchor":"python-and-django","children":[]},{"title":"Bunachar sonraí spásúil","anchor":"spatial-database","children":[]}]},{"title":"Suiteáil","anchor":"installation","children":[{"title":"Leabharlanna geospásúla","anchor":"geospatial-libraries","children":[]},{"title":"Suiteáil bunachar sonraí","anchor":"database-installation","children":[]},{"title":"DATABASES configuration","anchor":"databases-configuration","children":[]},{"title":"Cuir django.contrib.gis chuig: socrú: INSTALLED_APPS","anchor":"add-django-contrib-gis-to-installed-apps","children":[]}]},{"title":"Fabhtcheartú","anchor":"troubleshooting","children":[{"title":"Socruithe timpeallachta leabhar","anchor":"library-environment-settings","children":[{"title":"Athróg comhshaoil LD_LIBRARY_PATH","anchor":"ld-library-path-environment-variable","children":[]},{"title":"Cosán leabharlainne córais a shocrú","anchor":"setting-system-library-path","children":[]},{"title":"Suiteáil binutils","anchor":"install-binutils","children":[]}]}]},{"title":"Treoracha sonracha don ardán","anchor":"platform-specific-instructions","children":[{"title":"macOS","anchor":"macos","children":[{"title":"Python","anchor":"python","children":[]},{"title":"Postgres.app","anchor":"postgres-app","children":[]},{"title":"Bailebrew","anchor":"homebrew","children":[{"title":"Fink","anchor":"fink","children":[]}]},{"title":"MacPorts","anchor":"macports","children":[]}]},{"title":"Fuinneoga","anchor":"windows","children":[{"title":"Python","anchor":"id18","children":[]},{"title":"PostgreSQL","anchor":"postgresql","children":[]},{"title":"PostGIS","anchor":"postgis","children":[]},{"title":"OSGeo4w","anchor":"osgeo4w","children":[]},{"title":"Athraigh timpeallacht Windows","anchor":"modify-windows-environment","children":[]},{"title":"Suiteáil Django agus bunachar sonraí a bhunú","anchor":"install-django-and-set-up-database","children":[]},{"title":"Psychopg","anchor":"psycopg","children":[]}]}]}],"breadcrumbs":[{"docname":"ref/index","title":"Tagairt API","url":"/ga/5.2/ref/"},{"docname":"ref/contrib/index","title":"Pacáistí contrib","url":"/ga/5.2/ref/contrib/"},{"docname":"ref/contrib/gis/index","title":"GeodJango","url":"/ga/5.2/ref/contrib/gis/"}],"prev":{"docname":"ref/contrib/gis/tutorial","title":"Ranganna Teagaisc GeodJango","url":"/ga/5.2/ref/contrib/gis/tutorial/"},"next":{"docname":"ref/contrib/gis/install/geolibs","title":"Leabharlanna Geospásúla a","url":"/ga/5.2/ref/contrib/gis/install/geolibs/"},"formats":{"html":"/ga/5.2/ref/contrib/gis/install/","markdown":"/ga/5.2/ref/contrib/gis/install.md","json":"/ga/5.2/ref/contrib/gis/install.json"},"source":"https://github.com/django/django/blob/stable/5.2.x/docs/ref/contrib/gis/install/index.txt","official":"https://docs.djangoproject.com/ga/5.2/ref/contrib/gis/install/","inVersions":["6.1","6.0","5.2"],"inLocales":["en","sv","zh-hans","ga","fr","ja","id","it","pt-br","ko","es","el","pl"]}