It still doesn't work for me. I tried the following code:
import adsk.core, adsk.fusion, adsk.cam, traceback
import sys, os, subprocess
def run(context):
python_path = sys.executable.split( '/' )
python_path = python_path[ :python_path.index( 'Contents' ) + 1 ]
python_path = '/'.join( python_path ) + '/' + 'Frameworks/Python.framework/Versions/Current/bin/python'
app = adsk.core.Application.get()
try:
import pip
app.log("Made it to here")
except:
get_pip_filepath = os.path.join( os.path.dirname( __file__ ), 'get-pip.py')
subprocess.check_call( [ python_path, get_pip_filepath ] )
And I get the following errors:
SCRIPT ERROR
Traceback (most recent call last):
File "/Users/parsec/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Scripts/NewScript1/NewScript1.py", line 23, in run
import pip
ModuleNotFoundError: No module named 'pip'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/parsec/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Scripts/NewScript1/NewScript1.py", line 27, in run
subprocess.check_call( [ python_path, get_pip_filepath ] )
File "/Users/parsec/Library/Application Support/Autodesk/webdeploy/production/ea18aff57f0846f55d8fcb840ecd92f4bf0182fd/Autodesk Fusion 360.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/parsec/Library/Application Support/Autodesk/webdeploy/production/ea18aff57f0846f55d8fcb840ecd92f4bf0182fd/Autodesk Fusion 360.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python', '/Users/parsec/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Scripts/NewScript1/get-pip.py']' returned non-zero exit status 1.