I am having trouble getting z3 to work with Python. I am running Windows 7 64bit. I have downloaded 64bit Python 3.3.0 and 64bit z3 4.3.0. I have updated my PATH and PYTHONPATH to include the z3 \bin directory. However, when I try to use z3 in python I get the following error:
from z3 import *
Traceback (most recent call last):
File "", line 1, in
ImportError: bad magic number in 'z3': b'\x03\xf3\r\n'
Does anyone know what is going wrong and how to fix it?
Thanks
Z3 v4.3.0 does not support Python 3.3. We have to use Python 2.7 (or 2.6). The next official version will support Python 3.x. In the meantime, you can use the unstable (working-in-progress) branch. For more information see the following related question:
Using Z3Py With Python 3.3
Related
I have python 2.7.3 and netbeans 8.0 I already installed the plugins for python and works properly but I would like to use biopython but nothing is shown in the output, no even a error mnessage, I already have numpy, matplotlib, reportlab. How I could execute them in netbeans?
kind regards
I already have part of a program running in Python 3 but I need OpenCV (or SimpleCV), for a robotic vehicle, but I haven't found any install commands that seem to work, other than for Python 2.7.
If it is compatible could you please include instructions (/links to) for installation of the module?
I am using Ubuntu 14.
Maybe a little late to answer, but it's actually supported on OpenCV version 3 (in alpha state nowadays). I have successfully managed to install it, on MacOS, but I guess it would be similar on Ubuntu.
Now you have separated options for python2 and python3 when using Cmake. So you'll have to set those to make it work. That's all I needed to set:
BUILD_opencv_python3
PYTHON3_LIBRARY
PYTHON3_INCLUDE_DIR
PYTHON3_INCLUDE_DIR2
PYTHON3_NUMPY_INCLUDE_DIRS
...
Here you can find more detailed description: Link
Luigolas is correct that OpenCV 3.0 supports Python 3.x bindings. It was in release candidate status since April and the production version was released on 4 June 2015. Unfortunately for some reason the downloadable installation program on the OpenCV site does not contain a Python 3.x-compatible cv2.pyd file.
OP asked about Ubuntu but for those requiring a Windows installer, use Christoph Gohlke's site, which maintains Windows binaries for many Python packages, including OpenCV 3.0 with Python 3.x bindings. Visit:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv
To install, just download the 64-bit or 32-bit .whl file appropriate for your system, then run pip install [filename]. Then the instruction import cv2 should work in your Python 3.x interpreter.
I am having some hard time getting the Boogie and Z3 to install on Windows 7 with Z3 version 4.3.2 from codeplex.
I've tried to install it like spec# by register.cmd command in prompt, but it doesnt work.
Can anyone tell me how to do it ?
Boogie does not support Z3 version 4.3. You need version 4.1 (see the Installation page on boogie.codeplex.com, which I just updated).
By the way, the register.cmd thing was purely a Spec# thing.
I was installing QT5 and OpenCV 2.4.4 with CMAKE 2.8.10.2..
I was following the instruction from here and here .
The problem is, when I want to compile the OpenCV library with cmd, 'mingw32-make' is not recognized as internal or external command, operable program or batch file.
I don't know how to react, I've follow the instruction step by step..
Thanks for your answers :)
===============================
This question has been answered :)
the answer is I didn't put the path contains mingw32-make.exe (Qt5.0.2\Tools\MinGW\bin) to system variable. different version different path, made me confuse.
So, if you want to integrate Qt 5.0.2 and OpenCV 2.4.4 with CMAKE 2.8.10.2 in Windows 7, use instructions from two links that I mention it above, it works! Thanks:)
In start menu you can find pre-configured environment variable command prompt link for Qt MinGW. If you are using Qt 5.0.2 for Windows 32-bit (MinGW 4.7, 650 MB) you may find something like Qt 5.0.2 for Desktop (MinGW 4.7). Use it for your command. Please make sure you are using mingw32 version of Qt otherwise the command you are looking for is nmake.
I am having some hard time getting the Z3 Python frontend to work on Windows 7 with Z3 version 4.3.0 from codeplex. The older version 4.1.2 that was distributed as an MSI file works fine on my Windows 7.
First, I cannot use the source code from codeplex to build Z3 because I don't have Visual studio Command Prompt (do I really need it?). So I download the binary file 32 bit version and add that directory to my PYTHONPATH. This allows me to do import z3 , but I cannot use it any further because of the error Z3Exception: 'init(Z3_LIBRARY_PATH) must be invoked before using Z3-python' . The file z3.dll is not included in the download file.
I have no problem setting Z3 v4.3 on my Mac or Linux.
Visual Studio Express should be enough to compile Z3 and is available for free from Microsoft, here. However, it's not a requirement that Z3 be compiled from scratch to use Z3Py.
Starting with version 4.3.0, the DLL is now called libz3.dll and I just verified that it is indeed included in the download from Codeplex and it executes fine when I add it to PYTHONPATH. I can imagine that what went wrong in your case is that you added the directory C:...\z3-4.3.0-x86 to PYTHONPATH, while it is necessary that C:...\z3-4.3.0-x86\bin be added (note the \bin in the end).