目前,我正在研究Geodjango。我已经完成了用https://docs.djangoproject.com/en/2.1/ref/contrib/gis/install/#requirements编写的所有过程 对于Windows OS。但是现在我遇到了显示错误:
RewriteEngine on
RewriteCond %{HTTP_HOST} iptamenafanaria\.gr [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://iptamenafanaria.gr/$1 [R=301,L]
# URL CANONICALIZATION with www
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^([^.]+\.[a-z]{2,6})$ [NC]
RewriteRule ^(.*)$ https://www.%1/$1 [R=301,L]
<IfModule mod_headers.c>
Header set Connection keep-alive
</IfModule>
#GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
</ifmodule>
#BROWSER CACHE
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/pdf "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType text/x-javascript "access plus 1 year"
ExpiresByType application/x-shockwave-flash "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 1 month"
</IfModule>
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
# 2. In your opencart directory rename htaccess.txt to .htaccess.
# For any support issues please visit: http://www.opencart.com
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
Order deny,allow
Deny from all
</FilesMatch>
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
#RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.
# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off
# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off
# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M
# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M
# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200
# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200
# 7. disable open_basedir limitations
# php_admin_value open_basedir none
redirect 301 /Home.html http://www.iptamenafanaria.gr/index.php?route=common/home
redirect 301 /Lost-password.html http://www.iptamenafanaria.gr/index.php?route=account/forgotten
redirect 301 /Log-in.html http://www.iptamenafanaria.gr/index.php?route=account/login
redirect 301 /Ιπτάμενα-Φανάρια-Καρδιά.html http://www.iptamenafanaria.gr/all-products/kainotoma-iptamena-fanaria/iptamena-fanaria-kardia?
redirect 301 /Λευκά-Ιπτάμενα-Φανάρια.html http://www.iptamenafanaria.gr/all-products/kinezika-iptamena-fanaria/leuka-iptamena-fanaria?
redirect 301 /Ιπτάμενα-Φανάρια/Πολύχρωμα-Ιπτάμενα-Φανάρια-5-Τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/kinezika-iptamena-fanaria/xromatista-iptamena-fanaria?
redirect 301 /Καινοτόμα-Ιπτάμενα-Φανάρια/Ιπτάμενα-φανάρια-σε-σχήμα-διαμαντιού/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/kainotoma-iptamena-fanaria/iptamena-fanaria-diamanti?
redirect 301 /Καινοτόμα-Ιπτάμενα-Φανάρια/Ιπτάμενα-φανάρια-σε-σχήμα-κυλινδρικό/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/kainotoma-iptamena-fanaria/iptamena-fanaria-kylindrika?
redirect 301 /Ιπτάμενα-Φανάρια-Εκδηλώσεων/Ιπτάμενα-Φανάρια-Βάπτισης-50-Τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/iptamena-fanaria-ekdiloseon/iptamena-fanaria-vaptisis?
redirect 301 /Ιπτάμενα-Φανάρια-Γάμου.html http://www.iptamenafanaria.gr/all-products/iptamena-fanaria-ekdiloseon/iptamena-fanaria-gamou?
redirect 301 /Ιπτάμενα-Φανάρια-Γενεθλίων.html http://www.iptamenafanaria.gr/all-products/iptamena-fanaria-ekdiloseon/iptamena-fanaria-genethlion?
redirect 301 /Ιπτάμενα-Φανάρια-Πάρτυ.html http://www.iptamenafanaria.gr/all-products/iptamena-fanaria-ekdiloseon/iptamena-fanaria-party?
redirect 301 /Χάρτινα-Φωτοφόρα-Φανάρια/Αστέρια-και-Φεγγάρια-Χάρτινα-Φωτοφόρα-Φανάρια-10-τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/hartina-fanaria/asteria-feggaria?
redirect 301 /Χάρτινα-Φωτοφόρα-Φανάρια/Χάρτινα-Φωτοφόρα-Φανάρια-Happy-Birthday-10-Τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/hartina-fanaria/happy-birthday?
redirect 301 /Χάρτινα-Φωτοφόρα-Φανάρια/Χάρτινα-Φωτοφόρα-Φανάρια-Just-Married-10-Τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/hartina-fanaria/just-married?
redirect 301 /Διακοσμητικά-Φανάρια-Ήλιος.html http://www.iptamenafanaria.gr/all-products/hartina-fanaria/ilios?
redirect 301 /Χάρτινα-Φανάρια-Σακούλα/Διακοσμητικά-Φανάρια-Καρδιά-10-Τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/hartina-fanaria/kardia?
redirect 301 /Χάρτινα-Φωτοφόρα-Φανάρια/Χάρτινα-Φωτοφόρα-Φανάρια-Καρδιά-με-περιστέρια-10-Τεμάχια/flypage.tpl.html http:/www./iptamenafanaria.gr/all-products/hartina-fanaria/kardia-me-peristeria?
redirect 301 /Φανάρια-Νερού-Νούφαρο.html http://www.iptamenafanaria.gr/all-products/fanaria-nerou/fanaria-nerou-noufaro?
redirect 301 /Φανάρια-Νερού/Φανάρια-Νερού-Κύβος-10-Τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/fanaria-nerou/fanaria-nerou-tetragona?
redirect 301 /Κανονάκια-Κομφετί/Κομφετί-Κανονάκι-Κόκκινες-Μεταλλικές-Καρδιές/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/kanonakia-komfeti/kokkines-metallikes-kardies?
redirect 301 /Κομφετί-Κανονάκι-Λευκά-Ροδοπέταλα.html http://www.iptamenafanaria.gr/all-products/kanonakia-komfeti/leuka-rodopetala?
redirect 301 /Ιπτάμενα-μπαλόνια-με-ήλιον/Λευκά-Οικολογικά-Περιστέρια-Βιοδιασπώμενα-Μπαλόνια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/biodiaspomena-mpalonia/leuka-oikologika-peristeria?
redirect 301 /Χάρτινες-Μπάλες/Χάρτινα-Πομ-Πομ/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/kremasta-diakosmitika/xartina-pompom?
redirect 301 /View-all-products-in-shop.html http://www.iptamenafanaria.gr/all-products?
redirect 301 /oroi-kai-proipotheseis.html /terms?
redirect 301 /Ιπτάμενα-Φανάρια-Εκδηλώσεων.html http://www.iptamenafanaria.gr/all-products/iptamena-fanaria-ekdiloseon?
redirect 301 /ΧΑΡΤΙΝΕΣ-ΜΠΑΛΕΣ/View-all-products.html http://www.iptamenafanaria.gr/all-products/kremasta-diakosmitika?
redirect 301 /Επικοινωνία/IptamenaFanaria.GR.html http://www.iptamenafanaria.gr/contact?
redirect 301 /Ιπτάμενα-Φανάρια-Εκδηλώσεων/Ιπτάμενα-Φανάρια-Γάμου-50-Τεμάχια/flypage.tpl.html http://www.iptamenafanaria.gr/all-products/iptamena-fanaria-ekdiloseon/iptamena-fanaria-gamou?
redirect 301 /component/option,com_forme/Itemid,208/ http://www.iptamenafanaria.gr/sales?
redirect 301 /Φανάρια-Νερού.html http://www.iptamenafanaria.gr/all-products/fanaria-nerou?
redirect 301 /Ιπτάμενα-Φανάρια/View-all-products.html http://www.iptamenafanaria.gr/all-products/kinezika-iptamena-fanaria?
redirect 301 /tropoi-pliromis.html http://www.iptamenafanaria.gr/payment?
redirect 301 /Ιπτάμενα-Φαναρια-Κατάστημα.html http://www.iptamenafanaria.gr/all-products?
[您可以在此图像中看到此错误。] [1]
我已经使用OSGeo4W安装程序安装了PROJ4,GDAL和GEOS库。但是问题出在GDAL库上。之前有一个错误显示:-
OSError: [WinError 126] The specified module could not be found
然后使用
设置路径后django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal202", "gdal201", "gdal20", "gdal111", "gdal110", "gdal19"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.
在settings.py文件中,错误更改为我之前所说的:-
GDAL_LIBRARY_PATH = 'C:\\Users\\gaurav\\Anaconda3\\Lib\\site-packages\\django\\contrib\\gis\\gdal'
我还从https://sandbox.idre.ucla.edu/sandbox/tutorials/installing-gdal-for-windows重新安装了GDAL 并按照本网站提供的所有步骤进行操作,但问题仍未解决。
现在,我已经给出了此路径
OSError: [WinError 126] The specified module could not be found.
在settings.py中。 但是问题仍然没有解决。 谁能帮我这个忙。