$ python2 foo.py File "foo.py", line 1, in <module> import z3 File "/usr/local/lib/python2.7/site-packages/z3/__init__.py", line 1, in <module> from .z3 import * File "/usr/local/lib/python2.7/site-packages/z3/z3.py", line 44, in <module> from . import z3core File "/usr/local/lib/python2.7/site-packages/z3/z3core.py", line 4, in <module> import pkg_resources ImportError: No module named pkg_resources $ pkg install py27-setuptools $ pkg info -l py27-setuptools | grep pkg_resources /usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py $ python2 foo.py <error is gone>
Hum, this seems to be a relatively recent breakage. I've opened a diff https://reviews.freebsd.org/D13542 for it. Thanks for reporting the issue and posting the solution!
Thanks!
A commit references this bug: Author: jrm Date: Sun Dec 24 13:01:36 UTC 2017 New revision: 457155 URL: https://svnweb.freebsd.org/changeset/ports/457155 Log: math/z3: Add missing dependency on devel/py-setuptools PR: 224438 Reported by: cem Reviewed by: mat Approved by: 6yearold@gmail.com (maintainer) Differential Revision: https://reviews.freebsd.org/D13542 Changes: head/math/z3/Makefile