diff --git a/ghpythonremote/_configure_ironpython_installation.py b/ghpythonremote/_configure_ironpython_installation.py index 8f47123..eecfa86 100644 --- a/ghpythonremote/_configure_ironpython_installation.py +++ b/ghpythonremote/_configure_ironpython_installation.py @@ -1,7 +1,7 @@ import sys import os -import pip import logging +import subprocess from shutil import copy, rmtree from .helpers import get_rhino_ironpython_path @@ -16,13 +16,14 @@ # Install the package to Rhino IronPython Users lib package_name = 'gh-python-remote' - pip_cmd = ['install', '--upgrade', '--target=' + rhino_ironpython_path, + pip_cmd = [sys.executable, '-m', 'pip', 'install', '--upgrade', + '--target=' + rhino_ironpython_path, '--no-binary=:all:', '--no-compile', '--ignore-requires-python', '--process-dependency-links', package_name, ] print('\n\nThis will install ghpythonremote in Rhino IronPython with the command:') - print('pip ' + ' '.join(pip_cmd)) - pip.main(pip_cmd) + print(' '.join(pip_cmd)) + subprocess.call(pip_cmd) # Get the Grasshopper libraries base dir gh_userobjects_path = os.path.join(os.getenv('APPDATA', ''), 'Grasshopper', 'UserObjects')