Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Trying to install OWSlib-master (and 0.7.1) from yields problems that ultimately seem to be related to python3

>c:\Python32\python.exe install
running install
running bdist_egg
running egg_info
writing requirements to OWSLib.egg-info\requires.txt
writing OWSLib.egg-info\PKG-INFO
Traceback (most recent call last):
  File "", line 34, in <module>
    packages      = find_packages(),
  File "c:\Python32\lib\distutils\", line 148, in setup
  File "c:\Python32\lib\distutils\", line 917, in run_commands
    lines = header.split('\n')
TypeError: Type str doesn't support the buffer API

Are those errors errors of my (ActivePython 3.2) installation, or are these errors of OWSLib being incopatible with python 3? Has anyone succeded in running OWSlib on python 3?

share|improve this question
up vote 2 down vote accepted

In Python 3 this is an owslib setup bug at The value of

open('README.txt', 'rb').read()

is of type 'bytes' in Python 3. The setup script needs to do this

open('README.txt', 'r').read()

to get the expected 'str' type value.

share|improve this answer
FYI this is now fixed in OWSLib. Thanks Sean! – tomkralidis May 14 '13 at 21:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.