manoharan-lab/holopy

Problems about Scattering Calculations

Closed this issue · 4 comments

E:\3_ResWork\4_Particle_HO\Hologram_scattering\example>python calc_scat_matr.py
Traceback (most recent call last):
File "calc_scat_matr.py", line 15, in
matr = calc_scat_matrix(detector, distant_sphere, medium_index, illum_wavelen)
File "../HoloPy-win\holopy\scattering\interface.py", line 283, in calc_scat_matrix
theory = interpret_theory(scatterer, theory)
File "../HoloPy-win\holopy\scattering\interface.py", line 93, in interpret_theory
theory = determine_default_theory_for(scatterer)
File "../HoloPy-win\holopy\scattering\interface.py", line 123, in determine_default_theory_for
theory = Mie()
File "../HoloPy-win\holopy\scattering\theory\mie.py", line 80, in init
raise DependencyMissing("Mie theory", "This is probably "
holopy.core.errors.DependencyMissing: Calculation requires Mie theory but it could not be found. This is probably due to a problem with compiling Fortran code, as it should be built with the rest of HoloPy through f2py.

When I tried to run holopy3.5 on Windows, a problem occurred as above. Could anyone help me to solve it?

I had the same problem and searched for a long time. Finally, it worked with Python version 3.6.13.

This should be fixed in the develop branch, which now relies on python 3.9. If you install the environment listed in environment.yml, including the m2w64-toolchain package, you should be able to compile the scattering extensions under Windows.

We hope to have a conda package for Windows available after the release, so that you don't have to compile the scattering extensions yourself.