-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
This line is not working on Windows, with blender 4.5 :
subprocess.call([python_exe, "import ", packageName])
Here is a suggestion for fixing this
def installModule(packageName):
python_exe = python_exec()
try:
subprocess.check_call([python_exe, "-c", f"import {packageName}"])
except:
# upgrade pip
try:
subprocess.check_call([python_exe, "-m", "ensurepip", "--default-pip"])
except:
pass # ensurepip can fail if not already installed
# install required packages
subprocess.check_call([python_exe, "-m", "pip", "install", "--upgrade", "pip"])
subprocess.check_call([python_exe, "-m", "pip", "install", packageName])
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels