python-z3 package doesn't work, can't import z3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
One Hundred Papercuts |
Fix Released
|
Medium
|
Unassigned | ||
z3 (Debian) |
Fix Released
|
Unknown
|
|||
z3 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I installed python-z3 but was unable to use it. I cannot import `z3` module in my python interpreter:
$ python2.7
Python 2.7.12 (default, Jul 1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from z3 import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named z3
The .py and .pyc files are installed to /usr/lib/
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: python-z3 4.4.0-5
ProcVersionSign
Uname: Linux 4.4.0-31-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Aug 4 14:12:09 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2011-01-29 (2013 days ago)
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
SourcePackage: z3
UpgradeStatus: Upgraded to xenial on 2016-06-11 (53 days ago)
Changed in z3 (Ubuntu): | |
importance: | Undecided → Medium |
Changed in hundredpapercuts: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in z3 (Debian): | |
status: | Unknown → Fix Released |
Adding __init__.py fixes the problem but then I've to use `from z3.z3 import *` rather than `from z3 import *`. The proper fix would be, as noted by OP, install the z3*.py at top level.
Interestingly, in lp v4.4.0-2 of the package, the changelog (https:/ /launchpad. net/ubuntu/ +source/ z3/4.4. 0-2) mentions adding __init__.py but it isn't included in the amd64 .deb.