ModuleNotFoundError: No module named '_tkinter' on mac
had the simple solution as suggested in stackoverflow,
brew install python-tk
But other modules like scipy, pillow, etc could not be installed this way. ChatGPT suggested a virtual environment to avoid breakage.
1. Create a venv (once per project)
python3 -m venv ~/venvs/gui_env
(this path is just an example.)
2. Activate it
source ~/venvs/gui_env/bin/activate
prompt changes to something like:
(gui_env) %
3. Install the required packages
python -m pip install --upgrade pip
python -m pip install numpy scipy pillow
So, when I want to run py-ffmpeg-warp, I could run the following manually -
source ~/venvs/gui_env/bin/activate
cd /home/path/to/py/script
python3 py-ffmpeg-warp.py
No comments:
Post a Comment