IAHispano / Applio

A simple, high-quality voice conversion tool focused on ease of use and performance.
https://applio.org
MIT License
1.64k stars 265 forks source link

automatically use the correct python executable #480

Closed cocktailpeanut closed 3 months ago

cocktailpeanut commented 3 months ago

currently the core.py file runs the inference scripts using the hardcoded python command.

this is problematic when running inside a venv because the subprocess.run() starts a new process without inheriting the python executable that was used to run the parent process, and results in dependency errors (since it tries to look for dependencies in the globally installed python environment instead of the current venv when running inside a venv).

by using sys.executable, we can solve this. it will automatically use the globally installed python when running normally, and it will use the python in the current venv when running in a venv.