为Python获取gmsh(特别是PyCharm)

时间:2018-11-25 01:58:22

标签: python pycharm

我最近在尝试让openbte(https://pypi.org/project/openbte/)进行PyCharm时遇到此错误。

Traceback (most recent call last):
  File "C:\Users\turtl\PycharmProjects\untitled\venv\Scripts\openbte-script.py", line 11, in <module>
    load_entry_point('openbte==0.9.24', 'console_scripts', 'openbte')()
  File "C:\Users\turtl\PycharmProjects\untitled\venv\lib\site-packages\openbte\__main__.py", line 47, in main
    Geometry(**vars(args))
  File "C:\Users\turtl\PycharmProjects\untitled\venv\lib\site-packages\openbte\geometry.py", line 83, in __init__
    data = self.compute_mesh_data()
  File "C:\Users\turtl\PycharmProjects\untitled\venv\lib\site-packages\openbte\geometry.py", line 91, in compute_mesh_data
    self.import_mesh()
  File "C:\Users\turtl\PycharmProjects\untitled\venv\lib\site-packages\openbte\geometry.py", line 448, in import_mesh
    a=subprocess.check_output(['gmsh','-' + str(self.dim),'mesh.geo','-o','mesh.msh'])
  File "C:\Users\turtl\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "C:\Users\turtl\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 403, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Users\turtl\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "C:\Users\turtl\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 997, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

我得到了帮助,那个人告诉我,我可能需要安装gmsh(gmsh.info)。我下载了Windows版本,但不确定如何链接到PyCharm。有人有经验吗?

0 个答案:

没有答案