File size: 1,083 Bytes
bf2a29f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
import streamlit as st
st.title("MoviePy Import Test")
try:
import moviepy.editor
st.success("Successfully imported moviepy.editor!")
st.write(f"MoviePy version (if accessible): {getattr(moviepy, '__version__', 'N/A')}")
# You can add a simple moviepy operation here if the import works
# from moviepy.editor import TextClip
# try:
# clip = TextClip("Hello", fontsize=70, color='white')
# st.write("Created a TextClip object.")
# except Exception as e_clip:
# st.error(f"Error creating TextClip: {e_clip}")
except ModuleNotFoundError as e_mod:
st.error(f"ModuleNotFoundError: {e_mod}")
st.error("moviepy.editor could not be imported.")
except Exception as e:
st.error(f"An unexpected error occurred during import: {e}")
st.subheader("Installed Packages (pip list):")
import subprocess
import sys
try:
result = subprocess.run([sys.executable, "-m", "pip", "list"], capture_output=True, text=True, check=True)
st.code(result.stdout)
except Exception as e_pip:
st.error(f"Error running pip list: {e_pip}") |