在 Ubuntu 19.04 上安装 'pynusmv' 时出现问题
Problem installing 'pynusmv' on Ubuntu 19.04
我最近在我的机器上安装了 Ubuntu 19.04(我对这个 OS 还很陌生),我正在尝试为一些人安装 pynusmv 包大学工作。
但是,通过运行ning pip3 命令来安装它:
pip3 install pynusmv
我得到一个错误列表并且安装失败。我已经和其他人谈过,他们也做过同样的事情,但得到了 none 个错误,所以我对导致错误的原因感到困惑。
到目前为止我能找到的唯一区别是我的同学是 运行宁 Ubuntu 18.04,所以我试图了解问题是否出在那里。
我尝试了多种方法,比如更新swig和其他依赖,更新python和pip3,安装python开发工具; none 到目前为止,他们已经工作了。
预期结果
Pynusmv安装成功
实际结果
安装失败。这是我每次 运行 命令时得到的日志的一部分:
Collecting pynusmv
Downloading https://files.pythonhosted.org/packages/e0/b5/4c0f4970fefe927280e65f3951b5075da3f9ded2570478734b0e9d3b0f6a/pynusmv-1.0rc8.tar.gz (4.2MB)
|████████████████████████████████| 4.2MB 3.9MB/s
Requirement already satisfied: pyparsing in ./.local/lib/python3.7/site-packages (from pynusmv) (2.4.2)
Building wheels for collected packages: pynusmv
Building wheel for pynusmv (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jbjepncw/pynusmv/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jbjepncw/pynusmv/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-jd7g3u8c --python-tag cp37
cwd: /tmp/pip-install-jbjepncw/pynusmv/
Complete output (197 lines):
[...]
patch -p0 -N < makefiles.patch
patching file minisat/core/Makefile
patching file minisat/simp/Makefile
touch minisat.patched
make -C minisat
make[2]: Entering directory '/tmp/pip-install-jbjepncw/pynusmv/dependencies/MiniSat/minisat'
cd simp && make lib && ranlib libminisat.a
make[3]: Entering directory '/tmp/pip-install-jbjepncw/pynusmv/dependencies/MiniSat/minisat/simp'
Making dependencies ...
Compiling: Solver_C.or ( Solver_C.C )
Solver_C.C:44:8: error: expected unqualified-id before user-defined string literal
extern "C"void MiniSat_Delete(MiniSat_ptr ms)
^~~~~~~
make[3]: *** [../mtl/template.mk:63: Solver_C.or] Error 1
make[3]: Leaving directory '/tmp/pip-install-jbjepncw/pynusmv/dependencies/MiniSat/minisat/simp'
make[2]: *** [Makefile:28: simp/libminisat.a] Error 2
make[2]: Leaving directory '/tmp/pip-install-jbjepncw/pynusmv/dependencies/MiniSat/minisat'
make[1]: *** [Makefile:41: minisat.built] Error 2
make[1]: Leaving directory '/tmp/pip-install-jbjepncw/pynusmv/dependencies/MiniSat'
make: *** [Makefile:37: minisat.build] Error 2
make: Leaving directory '/tmp/pip-install-jbjepncw/pynusmv/dependencies'
Packing them in a shared library
Copying the result in lib
building 'pynusmv_lower_interface.nusmv.addons_core._addons_core' extension
swigging pynusmv_lower_interface/nusmv/addons_core/addons_core.i to pynusmv_lower_interface/nusmv/addons_core/addons_core_wrap.c
swig -python -py3 -I./dependencies/NuSMV/NuSMV-2.5.4/nusmv -I./dependencies/NuSMV/NuSMV-2.5.4/nusmv/src -I./dependencies/NuSMV/NuSMV-2.5.4/cudd-2.4.1.1/include -o pynusmv_lower_interface/nusmv/addons_core/addons_core_wrap.c pynusmv_lower_interface/nusmv/addons_core/addons_core.i
pynusmv_lower_interface/nusmv/addons_core/addons_core.i:15: Error: Unable to find '../../../dependencies/NuSMV/NuSMV-2.5.4/nusmv/src/utils/defs.h'
pynusmv_lower_interface/nusmv/addons_core/addons_core.i:16: Error: Unable to find '../../../dependencies/NuSMV/NuSMV-2.5.4/nusmv/src/addons_core/addonsCore.h'
error: command 'swig' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pynusmv
[...]
之后,它尝试清理安装但出现类似错误。我也试图通过错误来欺骗自己,并编辑依赖项中明显的拼写错误,但这也没有解决问题(安装继续进行,但 运行 仅对其进行单元测试 returns 错误)。
有办法解决这个问题吗?
最后好像还是Python的问题。
Ubuntu 19.04自带python 3.7,这个库貌似不太符合。
我在 pycharm 工作,所以我通过创建一个虚拟环境并在其中安装 python 3.6 来解决。在那里,pip3 安装了 pynusmv 没有问题。
我最近在我的机器上安装了 Ubuntu 19.04(我对这个 OS 还很陌生),我正在尝试为一些人安装 pynusmv 包大学工作。
但是,通过运行ning pip3 命令来安装它:
pip3 install pynusmv
我得到一个错误列表并且安装失败。我已经和其他人谈过,他们也做过同样的事情,但得到了 none 个错误,所以我对导致错误的原因感到困惑。
到目前为止我能找到的唯一区别是我的同学是 运行宁 Ubuntu 18.04,所以我试图了解问题是否出在那里。
我尝试了多种方法,比如更新swig和其他依赖,更新python和pip3,安装python开发工具; none 到目前为止,他们已经工作了。
预期结果
Pynusmv安装成功
实际结果
安装失败。这是我每次 运行 命令时得到的日志的一部分:
Collecting pynusmv
Downloading https://files.pythonhosted.org/packages/e0/b5/4c0f4970fefe927280e65f3951b5075da3f9ded2570478734b0e9d3b0f6a/pynusmv-1.0rc8.tar.gz (4.2MB)
|████████████████████████████████| 4.2MB 3.9MB/s
Requirement already satisfied: pyparsing in ./.local/lib/python3.7/site-packages (from pynusmv) (2.4.2)
Building wheels for collected packages: pynusmv
Building wheel for pynusmv (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jbjepncw/pynusmv/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jbjepncw/pynusmv/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-jd7g3u8c --python-tag cp37
cwd: /tmp/pip-install-jbjepncw/pynusmv/
Complete output (197 lines):
[...]
patch -p0 -N < makefiles.patch
patching file minisat/core/Makefile
patching file minisat/simp/Makefile
touch minisat.patched
make -C minisat
make[2]: Entering directory '/tmp/pip-install-jbjepncw/pynusmv/dependencies/MiniSat/minisat'
cd simp && make lib && ranlib libminisat.a
make[3]: Entering directory '/tmp/pip-install-jbjepncw/pynusmv/dependencies/MiniSat/minisat/simp'
Making dependencies ...
Compiling: Solver_C.or ( Solver_C.C )
Solver_C.C:44:8: error: expected unqualified-id before user-defined string literal
extern "C"void MiniSat_Delete(MiniSat_ptr ms)
^~~~~~~
make[3]: *** [../mtl/template.mk:63: Solver_C.or] Error 1
make[3]: Leaving directory '/tmp/pip-install-jbjepncw/pynusmv/dependencies/MiniSat/minisat/simp'
make[2]: *** [Makefile:28: simp/libminisat.a] Error 2
make[2]: Leaving directory '/tmp/pip-install-jbjepncw/pynusmv/dependencies/MiniSat/minisat'
make[1]: *** [Makefile:41: minisat.built] Error 2
make[1]: Leaving directory '/tmp/pip-install-jbjepncw/pynusmv/dependencies/MiniSat'
make: *** [Makefile:37: minisat.build] Error 2
make: Leaving directory '/tmp/pip-install-jbjepncw/pynusmv/dependencies'
Packing them in a shared library
Copying the result in lib
building 'pynusmv_lower_interface.nusmv.addons_core._addons_core' extension
swigging pynusmv_lower_interface/nusmv/addons_core/addons_core.i to pynusmv_lower_interface/nusmv/addons_core/addons_core_wrap.c
swig -python -py3 -I./dependencies/NuSMV/NuSMV-2.5.4/nusmv -I./dependencies/NuSMV/NuSMV-2.5.4/nusmv/src -I./dependencies/NuSMV/NuSMV-2.5.4/cudd-2.4.1.1/include -o pynusmv_lower_interface/nusmv/addons_core/addons_core_wrap.c pynusmv_lower_interface/nusmv/addons_core/addons_core.i
pynusmv_lower_interface/nusmv/addons_core/addons_core.i:15: Error: Unable to find '../../../dependencies/NuSMV/NuSMV-2.5.4/nusmv/src/utils/defs.h'
pynusmv_lower_interface/nusmv/addons_core/addons_core.i:16: Error: Unable to find '../../../dependencies/NuSMV/NuSMV-2.5.4/nusmv/src/addons_core/addonsCore.h'
error: command 'swig' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pynusmv
[...]
之后,它尝试清理安装但出现类似错误。我也试图通过错误来欺骗自己,并编辑依赖项中明显的拼写错误,但这也没有解决问题(安装继续进行,但 运行 仅对其进行单元测试 returns 错误)。
有办法解决这个问题吗?
最后好像还是Python的问题。 Ubuntu 19.04自带python 3.7,这个库貌似不太符合。
我在 pycharm 工作,所以我通过创建一个虚拟环境并在其中安装 python 3.6 来解决。在那里,pip3 安装了 pynusmv 没有问题。