Skip to content

Commit 4082060

Browse files
committed
specify explicit target path for dependencies install
1 parent 10f4120 commit 4082060

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/resources/blender-scripts/install_addon.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import bpy
3333
import sys
3434
import addon_utils
35+
from pathlib import Path
3536

3637
# install pip
3738

@@ -52,8 +53,9 @@ def get_python_path():
5253
# install dependencies
5354

5455
python_path = get_python_path()
56+
target = Path(python_path).parent.parent/"lib"/"site-packages"
5557
packages = {'grpcio', 'bidict', 'grpcio-tools', 'pandas'}
56-
subprocess.check_output([python_path, '-m', 'pip', 'install', *packages])
58+
subprocess.check_output([python_path, '-m', 'pip', 'install', "--upgrade", '--target', str(target), *packages])
5759

5860
# test if dependencies are installed
5961

0 commit comments

Comments
 (0)