Updated WindowsInstallation (markdown)

Dane Springmeyer 2013-12-02 15:07:38 -08:00
parent 8f6e52f73c
commit d5fb37d02c

@ -43,40 +43,49 @@ This Guide will walk you through installing Mapnik and then running a test scrip
## Manual Instructions ## Manual Instructions
1. Download the Mapnik binary ### Step 1: Download the Mapnik binary
2. Place the unzipped folder into *"C:\mapnik-v2.2.0\"* ### Step 2: Place the unzipped folder into *"C:\mapnik-v2.2.0\"*
3. Set your system and/or users environment variables: ### Step 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.
* 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.
* 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: Do this at _Control Panel->System->Advanced->Environment Variables_
* 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: - 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`
- for PYTHON support add:
- 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`
### Step 4: Ensure PATH variables are correct
- Open a new console by running "cmd" to test settings.
- Type "path" to make sure your PATH contains `C:\mapnik-v2.2.0\lib`
### Step 5: Test python import
- Run `C:\Python27\python.exe`
- Then type at a python prompt:
```python ```python
import mapnik import mapnik
``` ```
* If you get no error message, you made it! - If you get no error message, you made it!
* If you do get an error message, see *Troubleshooting* below - 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` ### Step 6: Test demo program
* you should see several demo.* files output.
7. If you run into errors, confirm that you've added the right paths to your environment. - Open explorer, go to `C:\mapnik-v2.2.0\demo\python`
* Post further errors to the mailing list for assistance. - Double click `rundemo.py`
- You should see several demo.* files output.
8. Head over to GettingStarted for your first tutorial on the Mapnik Python API. ### Step 7: Learn more
Head over to [[GettingStarted]] for your first tutorial on the Mapnik Python API.
## Trouble Shooting ## Trouble Shooting