源安装期间出错 - MEEP - 在 macos 上

发布于 2025-01-12 02:13:03 字数 4470 浏览 6 评论 0原文

我正在尝试按照以下推荐步骤在 macOS 上从源代码安装 MIT 的 meep: 在 macOS 上从源代码安装 meep

之后最后一步,我运行“make check”以确保一切顺利。 但是,python 显示以下错误:

============================================================================
Testsuite summary for meep 1.22.0

TOTAL: 23

PASS: 23

SKIP: 0

XFAIL: 0

FAIL: 0

XPASS: 0

ERROR: 0

============================================================================
Making check in scheme
/Applications/Xcode.app/Contents/Developer/usr/bin/make check-am
make[2]: Nothing to be done for check-am'. Making check in libpympb make[1]: Nothing to be done for check'.
Making check in python
/Applications/Xcode.app/Contents/Developer/usr/bin/make check-am
/Applications/Xcode.app/Contents/Developer/usr/bin/make check-TESTS
FAIL: tests/test_3rd_harm_1d.py
FAIL: tests/test_absorber_1d.py
FAIL: tests/test_adjoint_solver.py
FAIL: tests/test_adjoint_cyl.py
FAIL: tests/test_adjoint_jax.py
FAIL: tests/test_antenna_radiation.py
FAIL: tests/test_array_metadata.py
FAIL: tests/test_bend_flux.py
FAIL: tests/test_binary_partition_utils.py
FAIL: tests/test_binary_grating.py
FAIL: tests/test_cavity_arrayslice.py
FAIL: tests/test_cavity_farfield.py
FAIL: tests/test_chunk_balancer.py
FAIL: tests/test_chunk_layout.py
FAIL: tests/test_chunks.py
FAIL: tests/test_conductivity.py
FAIL: tests/test_cyl_ellipsoid.py
FAIL: tests/test_dft_energy.py
FAIL: tests/test_dft_fields.py
FAIL: tests/test_diffracted_planewave.py
FAIL: tests/test_dispersive_eigenmode.py
FAIL: tests/test_divide_mpi_processes.py
FAIL: tests/test_dump_load.py
FAIL: tests/test_eigfreq.py
FAIL: tests/test_faraday_rotation.py
FAIL: tests/test_field_functions.py
FAIL: tests/test_force.py
FAIL: tests/test_fragment_stats.py
FAIL: tests/test_gaussianbeam.py
FAIL: tests/test_geom.py
FAIL: tests/test_get_point.py
FAIL: tests/test_get_epsilon_grid.py
FAIL: tests/test_holey_wvg_bands.py
FAIL: tests/test_holey_wvg_cavity.py
FAIL: tests/test_kdom.py
FAIL: tests/test_ldos.py
FAIL: tests/test_material_dispersion.py
FAIL: tests/test_material_grid.py
FAIL: tests/test_medium_evaluations.py
FAIL: tests/test_mpb.py
FAIL: tests/test_mode_coeffs.py
FAIL: tests/test_mode_decomposition.py
FAIL: tests/test_multilevel_atom.py
FAIL: tests/test_n2f_periodic.py
FAIL: tests/test_oblique_source.py
FAIL: tests/test_physical.py
FAIL: tests/test_prism.py
FAIL: tests/test_pw_source.py
FAIL: tests/test_refl_angular.py
FAIL: tests/test_ring.py
FAIL: tests/test_ring_cyl.py
FAIL: tests/test_simulation.py
FAIL: tests/test_special_kz.py
FAIL: tests/test_source.py
FAIL: tests/test_timing_measurements.py
FAIL: tests/test_user_defined_material.py
FAIL: tests/test_visualization.py
FAIL: tests/test_wvg_src.py

Testsuite summary for meep 1.22.0

TOTAL: 58

PASS: 0

SKIP: 0

XFAIL: 0

FAIL: 58

XPASS: 0

ERROR: 0

============================================================================
See python/test-suite.log

make[4]: *** [test-suite.log] Error 1
make[3]: *** [check-TESTS] Error 2
make[2]: *** [check-am] Error 2
make[1]: *** [check] Error 2
make: *** [check-recursive] Error 1

可能的原因是什么? 另外,我尝试使用以下命令安装相同的内容:

pip install meep

但 meep 中的某些属性显示为缺失。那么,这些错误可能存在某种关联吗?

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Input In [1], in <cell line: 11>()
      9 sx = 16  # size of cell in X direction
     10 sy = 32  # size of cell in Y direction
---> 11 cell = mp.Vector3(sx,sy,0)
     13 dpml = 1.0
     14 pml_layers = [mp.PML(dpml)]

AttributeError: module 'meep' has no attribute 'Vector3'

我查看了一些日志文件,这是错误之一:

Traceback (most recent call last):
  File "./tests/test_binary_grating.py", line 4, in <module>
    import meep as mp
  File "/Users/pranav/desktop/Nanophotonics-project/MEEP/meep-1.22.0/python/meep/__init__.py", line 4164, in <module>
    from .simulation import (
  File "/Users/pranav/desktop/Nanophotonics-project/MEEP/meep-1.22.0/python/meep/simulation.py", line 5524
    yield from self.left._print(prefix=prefix+ext_l, is_root=False)
             ^
SyntaxError: invalid syntax
FAIL tests/test_binary_grating.py (exit status: 1)

其他日志文件遵循类似的模式。在其中一个中,它显示模块 h5py 不存在,但它确实存在。我使用 pip 安装了所有 python 模块,所以我猜路径一定不是问题,但这可能可以解释它。

I am trying to install MIT's meep from source on my macOS following this recommended procedure:
install meep from source on macOs

After the final step, I ran "make check" to ensure that everything went well.
However, the following error is shown for python:

============================================================================
Testsuite summary for meep 1.22.0

TOTAL: 23

PASS: 23

SKIP: 0

XFAIL: 0

FAIL: 0

XPASS: 0

ERROR: 0

============================================================================
Making check in scheme
/Applications/Xcode.app/Contents/Developer/usr/bin/make check-am
make[2]: Nothing to be done for check-am'. Making check in libpympb make[1]: Nothing to be done for check'.
Making check in python
/Applications/Xcode.app/Contents/Developer/usr/bin/make check-am
/Applications/Xcode.app/Contents/Developer/usr/bin/make check-TESTS
FAIL: tests/test_3rd_harm_1d.py
FAIL: tests/test_absorber_1d.py
FAIL: tests/test_adjoint_solver.py
FAIL: tests/test_adjoint_cyl.py
FAIL: tests/test_adjoint_jax.py
FAIL: tests/test_antenna_radiation.py
FAIL: tests/test_array_metadata.py
FAIL: tests/test_bend_flux.py
FAIL: tests/test_binary_partition_utils.py
FAIL: tests/test_binary_grating.py
FAIL: tests/test_cavity_arrayslice.py
FAIL: tests/test_cavity_farfield.py
FAIL: tests/test_chunk_balancer.py
FAIL: tests/test_chunk_layout.py
FAIL: tests/test_chunks.py
FAIL: tests/test_conductivity.py
FAIL: tests/test_cyl_ellipsoid.py
FAIL: tests/test_dft_energy.py
FAIL: tests/test_dft_fields.py
FAIL: tests/test_diffracted_planewave.py
FAIL: tests/test_dispersive_eigenmode.py
FAIL: tests/test_divide_mpi_processes.py
FAIL: tests/test_dump_load.py
FAIL: tests/test_eigfreq.py
FAIL: tests/test_faraday_rotation.py
FAIL: tests/test_field_functions.py
FAIL: tests/test_force.py
FAIL: tests/test_fragment_stats.py
FAIL: tests/test_gaussianbeam.py
FAIL: tests/test_geom.py
FAIL: tests/test_get_point.py
FAIL: tests/test_get_epsilon_grid.py
FAIL: tests/test_holey_wvg_bands.py
FAIL: tests/test_holey_wvg_cavity.py
FAIL: tests/test_kdom.py
FAIL: tests/test_ldos.py
FAIL: tests/test_material_dispersion.py
FAIL: tests/test_material_grid.py
FAIL: tests/test_medium_evaluations.py
FAIL: tests/test_mpb.py
FAIL: tests/test_mode_coeffs.py
FAIL: tests/test_mode_decomposition.py
FAIL: tests/test_multilevel_atom.py
FAIL: tests/test_n2f_periodic.py
FAIL: tests/test_oblique_source.py
FAIL: tests/test_physical.py
FAIL: tests/test_prism.py
FAIL: tests/test_pw_source.py
FAIL: tests/test_refl_angular.py
FAIL: tests/test_ring.py
FAIL: tests/test_ring_cyl.py
FAIL: tests/test_simulation.py
FAIL: tests/test_special_kz.py
FAIL: tests/test_source.py
FAIL: tests/test_timing_measurements.py
FAIL: tests/test_user_defined_material.py
FAIL: tests/test_visualization.py
FAIL: tests/test_wvg_src.py

Testsuite summary for meep 1.22.0

TOTAL: 58

PASS: 0

SKIP: 0

XFAIL: 0

FAIL: 58

XPASS: 0

ERROR: 0

============================================================================
See python/test-suite.log

make[4]: *** [test-suite.log] Error 1
make[3]: *** [check-TESTS] Error 2
make[2]: *** [check-am] Error 2
make[1]: *** [check] Error 2
make: *** [check-recursive] Error 1

What could be the possible cause?
Also, I have tried to install the same using:

pip install meep

But some attributes in meep are shown as missing. So, could these errors possibly have some correlation?

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Input In [1], in <cell line: 11>()
      9 sx = 16  # size of cell in X direction
     10 sy = 32  # size of cell in Y direction
---> 11 cell = mp.Vector3(sx,sy,0)
     13 dpml = 1.0
     14 pml_layers = [mp.PML(dpml)]

AttributeError: module 'meep' has no attribute 'Vector3'

I looked into some of the log files, and this is one of the errors:

Traceback (most recent call last):
  File "./tests/test_binary_grating.py", line 4, in <module>
    import meep as mp
  File "/Users/pranav/desktop/Nanophotonics-project/MEEP/meep-1.22.0/python/meep/__init__.py", line 4164, in <module>
    from .simulation import (
  File "/Users/pranav/desktop/Nanophotonics-project/MEEP/meep-1.22.0/python/meep/simulation.py", line 5524
    yield from self.left._print(prefix=prefix+ext_l, is_root=False)
             ^
SyntaxError: invalid syntax
FAIL tests/test_binary_grating.py (exit status: 1)

Others follow a similar pattern. In one, it showed the module h5py did not exist, but it does. I installed all python modules using pip, so I'm guessing path mustn't be the issue, but that might explain it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文