Skip to content

Commit 9f5e050

Browse files
committed
Remove dependency on pip.main, use subprocess.call instead. Fix #12.
1 parent 1df3447 commit 9f5e050

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ghpythonremote/_configure_ironpython_installation.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
22
import os
3-
import pip
43
import logging
4+
import subprocess
55
from shutil import copy, rmtree
66
from .helpers import get_rhino_ironpython_path
77

@@ -16,13 +16,14 @@
1616

1717
# Install the package to Rhino IronPython Users lib
1818
package_name = 'gh-python-remote'
19-
pip_cmd = ['install', '--upgrade', '--target=' + rhino_ironpython_path,
19+
pip_cmd = [sys.executable, '-m', 'pip', 'install', '--upgrade',
20+
'--target=' + rhino_ironpython_path,
2021
'--no-binary=:all:', '--no-compile', '--ignore-requires-python',
2122
'--process-dependency-links',
2223
package_name, ]
2324
print('\n\nThis will install ghpythonremote in Rhino IronPython with the command:')
24-
print('pip ' + ' '.join(pip_cmd))
25-
pip.main(pip_cmd)
25+
print(' '.join(pip_cmd))
26+
subprocess.call(pip_cmd)
2627

2728
# Get the Grasshopper libraries base dir
2829
gh_userobjects_path = os.path.join(os.getenv('APPDATA', ''), 'Grasshopper', 'UserObjects')

0 commit comments

Comments
 (0)