{"title":"Suiteáil GeodJango","version":"6.1","locale":"ga","docname":"ref/contrib/gis/install/index","url":"/ga/6.1/ref/contrib/gis/install/","canonical":"https://djangodocs.dev/ga/6.1/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.","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/6.1/ref/contrib/gis/install/geolibs/#geolibs-list\"><span class=\"std std-ref\">Leabharlanna geospásúla</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>The geospatial libraries required for a GeoDjango installation depends\non the spatial database used. The following lists the library requirements,\nsupported versions, and any notes for each of the supported database backends:</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>15+</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.4+</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.37.0+</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/6.1/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/6.1/ref/contrib/gis/install/postgis/\">PostGIS a shuiteáil</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"/ga/6.1/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/6.1/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>File a ticket on the <a href=\"#id23\"><span class=\"problematic\" id=\"id25\">`Django trac`__</span></a> if you think there's a bug. Make\nsure to provide a complete description of the problem, versions used,\nand specify the component as &quot;GIS&quot;.</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>A user may set this environment variable to customize the library paths\nthey want to use. The typical library directory for software\nbuilt from source is <code class=\"docutils literal notranslate\">/usr/local/lib</code>. Thus, <code class=\"docutils literal notranslate\">/usr/local/lib</code> needs\nto be included in the <code class=\"docutils literal notranslate\">LD_LIBRARY_PATH</code> variable. For example, the user\ncould place the following in their bash profile:</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>On GNU/Linux systems, there is typically a file in <code class=\"docutils literal notranslate\">/etc/ld.so.conf</code>, which\nmay include additional paths from files in another directory, such as\n<code class=\"docutils literal notranslate\">/etc/ld.so.conf.d</code>. As the root user, add the custom library path (like\n<code class=\"docutils literal notranslate\">/usr/local/lib</code>) on a new line in <code class=\"docutils literal notranslate\">ld.so.conf</code>. This is <em>one</em> example of\nhow to do so:</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>For OpenSolaris users, the system library path may be modified using the\n<code class=\"docutils literal notranslate\">crle</code> utility. Run <code class=\"docutils literal notranslate\">crle</code> with no options to see the current configuration\nand use <code class=\"docutils literal notranslate\">crle -l</code> to set with the new library path. Be <em>very</em> careful when\nmodifying the system library path:</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>GeoDjango uses the <code class=\"docutils literal notranslate\">find_library</code> function (from the <code class=\"docutils literal notranslate\">ctypes.util</code> Python\nmodule) to discover libraries. The <code class=\"docutils literal notranslate\">find_library</code> routine uses a program\ncalled <code class=\"docutils literal notranslate\">objdump</code> (part of the <code class=\"docutils literal notranslate\">binutils</code> package) to verify a shared\nlibrary on GNU/Linux systems. Thus, if <code class=\"docutils literal notranslate\">binutils</code> is not installed on your\nLinux system then Python's ctypes may not be able to find your library even if\nyour library path is set correctly and geospatial libraries were built\nperfectly.</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/6.1/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>Although macOS comes with Python installed, users can use <a href=\"#id23\"><span class=\"problematic\" id=\"id26\">`framework\ninstallers`__</span></a> provided by the Python Software Foundation. An advantage to\nusing the installer is that macOS's Python will remain &quot;pristine&quot; for internal\noperating system use.</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><a class=\"reference external\" href=\"https://postgresapp.com/\">Postgres.app</a> is a standalone PostgreSQL server\nthat includes the PostGIS extension. You will also need to install <code class=\"docutils literal notranslate\">gdal</code>\nwith <a class=\"reference internal\" href=\"#homebrew\"><span class=\"std std-ref\">Bailebrew</span></a>.</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=\"id27\">`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</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=\"id28\">`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=\"id29\">`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><a href=\"#id23\"><span class=\"problematic\" id=\"id30\">`MacPorts`__</span></a> may be used to install GeoDjango prerequisites on computers\nrunning macOS. Because MacPorts still builds the software from source,\n<a class=\"reference external\" href=\"https://developer.apple.com/xcode/\">Xcode</a> is required.</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 postgresql15-server\n$ sudo port install geos\n$ sudo port install proj6\n$ sudo port install postgis3\n$ sudo port install gdal\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/postgresql15/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/postgresql15\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>Download the latest <a href=\"#id23\"><span class=\"problematic\" id=\"id31\">`PostgreSQL 15.x installer`__</span></a> from the\n<a href=\"#id23\"><span class=\"problematic\" id=\"id32\">`EnterpriseDB`__</span></a> website. After downloading, run the installer, follow the\non-screen directions, and keep the default options unless you know the\nconsequences of changing them.</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>If installed successfully, the PostgreSQL server will run in the background\neach time the system is started as a Windows service. A\n<span class=\"menuselection\">PostgreSQL 15</span> start menu group will created and contains\nshortcuts for the Application Stack Builder (ASB) as well as the\n'SQL Shell', which will launch a <code class=\"docutils literal notranslate\">psql</code> command window.</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>The <a class=\"reference external\" href=\"https://trac.osgeo.org/osgeo4w/\">OSGeo4W installer</a> helps to install the PROJ, GDAL, and GEOS libraries\nrequired by GeoDjango. First, download the <a class=\"reference external\" href=\"https://trac.osgeo.org/osgeo4w/\">OSGeo4W installer</a>, and\nrun it. Select <span class=\"menuselection\">Express Web-GIS Install</span> and click next. In the\n'Select Packages' list, ensure that GDAL is selected. If any other packages are\nenabled by default, they are not required by GeoDjango and may be unchecked\nsafely. After clicking next and accepting the license agreements, the packages\nwill be automatically downloaded and installed, after which you may exit the\ninstaller.</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>In order to use GeoDjango, you will need to add your OSGeo4W\ndirectories to your Windows system <code class=\"docutils literal notranslate\">Path</code>, as well as create <code class=\"docutils literal notranslate\">GDAL_DATA</code>\nand <code class=\"docutils literal notranslate\">PROJ_LIB</code> environment variables. The following set of commands,\nexecutable with <code class=\"docutils literal notranslate\">cmd.exe</code>, will set this up. Restart your device\nonce this is complete for new environment variables to be recognized:</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/6.1/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/6.1/ref/"},{"docname":"ref/contrib/index","title":"Pacáistí contrib","url":"/ga/6.1/ref/contrib/"},{"docname":"ref/contrib/gis/index","title":"GeodJango","url":"/ga/6.1/ref/contrib/gis/"}],"prev":{"docname":"ref/contrib/gis/tutorial","title":"Ranganna Teagaisc GeodJango","url":"/ga/6.1/ref/contrib/gis/tutorial/"},"next":{"docname":"ref/contrib/gis/install/geolibs","title":"Leabharlanna Geospásúla a","url":"/ga/6.1/ref/contrib/gis/install/geolibs/"},"formats":{"html":"/ga/6.1/ref/contrib/gis/install/","markdown":"/ga/6.1/ref/contrib/gis/install.md","json":"/ga/6.1/ref/contrib/gis/install.json"},"source":"https://github.com/django/django/blob/stable/6.1.x/docs/ref/contrib/gis/install/index.txt","official":"https://docs.djangoproject.com/ga/6.1/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"]}