import os
import sys
import scipy
import numpy

print(f"Python executable: {sys.executable}")
print(f"Scipy version: {scipy.__version__}")
print(f"Scipy path: {scipy.__file__}")
scipy_dir = os.path.dirname(scipy.__file__)
parent_dir = os.path.dirname(scipy_dir)
scipy_libs = os.path.join(parent_dir, "scipy.libs")
print(f"Checking for scipy.libs at: {scipy_libs}")
if os.path.exists(scipy_libs):
    print("scipy.libs FOUND.")
    for root, dirs, files in os.walk(scipy_libs):
        for f in files:
            print(f"  - {f}")
else:
    print("scipy.libs NOT FOUND.")

print("-" * 20)
print(f"Numpy version: {numpy.__version__}")
print(f"Numpy path: {numpy.__file__}")
numpy_dir = os.path.dirname(numpy.__file__)
numpy_libs = os.path.join(numpy_dir, ".libs") # numpy 往往在内部
if not os.path.exists(numpy_libs):
    # try parent
    numpy_libs = os.path.join(os.path.dirname(numpy_dir), "numpy.libs")

print(f"Checking for numpy libs at: {numpy_libs}")
if os.path.exists(numpy_libs):
    print("numpy libs FOUND.")
    for root, dirs, files in os.walk(numpy_libs):
        for f in files:
            print(f"  - {f}")
else:
    print("numpy libs NOT FOUND.")

