Windows下安装Z3的Python3版
GitHub官方仓库地址:Z3Prover/z3: The Z3 Theorem Prover
pip 安装(不推荐,很慢)
z3的pip仓库网址:z3-solver · PyPI
先尝试使用pip安装:
pip install z3-solver
报错如下:
(base) C:\Users\peter>pip install z3-solver
Collecting z3-solver
Downloading https://files.pythonhosted.org/packages/83/7e/9e3b84ed773945cfa3c00e64c3ef49c492bf4b6f60cf6223b8756053e7f4/z3-solver-4.8.0.0.post1.tar.gz (4.1MB)
100% |████████████████████████████████| 4.1MB 2.8MB/s
Building wheels for collected packages: z3-solver
Running setup.py bdist_wheel for z3-solver ... error
Complete output from command C:\Users\peter\AppData\Local\Continuum\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\peter\\AppData\\Local\\Temp\\pip-install-rowyaqt4\\z3-solver\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel

在Windows上安装Z3的Python3版本,推荐使用微软官方预先构建的DLL,而非通过pip安装,因为pip安装需要编译,速度较慢。首先从Z3的GitHub release页面下载最新win-x64.zip,解压后将Z3in添加到PATH环境变量,并设置PYTHONPATH=Z3inpython,然后通过测试代码确认安装成功。
最低0.47元/天 解锁文章
2453

被折叠的 条评论
为什么被折叠?



