Updated WindowsInstallation (markdown)

Dane Springmeyer 2013-06-18 10:19:17 -07:00
parent 548407e286
commit df4ee763b5

@ -49,18 +49,19 @@ This Guide will walk you through installing Mapnik and then running a test scrip
3. Set your system and/or users environment variables:
* Hint: _Control Panel->System->Advanced->Environment Variables_
a. add *"C:\mapnik-v2.2.0\lib"* to the `PATH` variable.
a. add `;C:\mapnik-v2.2.0\lib;` to the `PATH` variable.
* Note: The `;` characters are separators so add them before or after other entries that may be in your `PATH` variable. If you are only adding `C:\mapnik-v2.2.0\lib` (and your `PATH` has not been modified/added to yet then technically you can leave out the `;` until you add more entries.
* Note: you may also need to set your user path environment variable.
* If the variable `PATH` is not already present, add it.
* Setting this correctly allows the Mapnik python bindings to find the `mapnik.dll`
b. for PYTHON support add:
* PYTHON 2.7: '''"C:\mapnik-v2.2.0\python\2.7\site-packages"''' to the `PYTHONPATH` variable.
* PYTHON 2.7: `;C:\mapnik-v2.2.0\python\2.7\site-packages;` to the `PYTHONPATH` variable.
* Setting this correctly allows Python to find the Mapnik python bindings when you do `>>> import mapnik`
4. Open a new console by running "cmd" to test settings:
* Type "path" to make sure your PATH contains *"C:\mapnik-v2.2.0\lib"*
* Type "path" to make sure your PATH contains `C:\mapnik-v2.2.0\lib`
5. Run "C:\Python27\python.exe" , then type at a python prompt:
5. Run `C:\Python27\python.exe`, then type at a python prompt:
```python
import mapnik
@ -69,7 +70,7 @@ import mapnik
* If you get no error message, you made it!
* If you do get an error message, see *Troubleshooting* below
6. open explorer, go to *"C:\mapnik-v2.2.0\demo\python"*, double click `rundemo.py`
6. open explorer, go to `C:\mapnik-v2.2.0\demo\python`, double click `rundemo.py`
* you should see several demo.* files output.
7. If you run into errors, confirm that you've added the right paths to your environment.
@ -99,7 +100,7 @@ Problem: When importing mapnik in python you get:
ImportError: No module named mapnik
```
Solution: make sure that you have put the 'site-packages' folder on your PYTHONPATH by completing *Step 3.b.*
Solution: make sure that you have put the `site-packages` folder on your PYTHONPATH by completing *Step 3.b.*
### Unknown (Windows) Dependency not found
@ -116,4 +117,4 @@ Solution:
* You likely have an older system and need to install the 2008 Visual Studio Runtime Libraries (msvcrt90.dll) from the [Microsoft Developer Network](http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en). If that does not fix it you may also be missing the [2005 version](http://www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en)
* This problem may also occur on a freshly installed system that is missing some dependecies or has an incompatible version of some DLLs. In my case I had to install the MSVC dependencies (vcredist_x86.exe) and additionally put a downloaded msvcr90.dll into the mapnik/lib folder.
* You can get more information on what is missing or incompatible by examining mapnik.dll with [Dependency Walker](http://www.dependencywalker.com/). On a 64bit system you must use the 32bit Version.
* You can get more information on what is missing or incompatible by examining mapnik.dll with [Dependency Walker](http://www.dependencywalker.com/). On a 64bit system you must use the 32bit Version.