I am trying to install mapscript using pip and I get this error.

$ python --version
Python 3.5.2

$ pip --version
pip 19.0.1 from /home/vguide/.virtualenvs/floodsam/lib/python3.5/site-packages/pip (python 3.5)

$ pip install mapscript
Collecting mapscript
  Using cached https://files.pythonhosted.org/packages/2a/4a/89ac6d24d2a93ee4f4bb1d3d9bdc0af8e86ba000a12a69fd3ed1e1907948/mapscript-
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-4k4zcy5u/mapscript/setup.py", line 43
        except Exception, e:
    SyntaxError: invalid syntax

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-4k4zcy5u/mapscript/

What am I doing wrong? Any help would be appreciated.

1 Answer 1


As I understand it, PyPI (source for pip) only provides generic mapscript packages up to usable for linux/mac, and this is not python3 compatible. The higher versions (e.g. https://pypi.org/project/mapscript/7.2.2/#files) are binary "Wheels" for windows only.

I'm still searching for a workable solution though...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .