Page 1 of 1

Launching an interactive py3 plugin script shell...

PostPosted: Sat May 28, 2022 4:10 pm
by DPattee
If I log in to my remote indigo server via remote desktop and use the 'open scripting shell' menu in Indigo, I get a py3 one
Code: Select all
Python 3.10.2 (v3.10.2:a58ebcc701, Jan 13 2022, 14:50:16) [Clang 13.0.0 (clang-1300.0.29.30)]
Connected to Indigo Server v2022.1.0, api v3.0 (localhost:1176)
>>>

But, if I ssh in to that machine I get a py2 one.
Code: Select all
Password:
Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 19 2020, 20:48:48)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
Connected to Indigo Server v2022.1.0, api v2.5 (DEPRECATED) (localhost:1176)
>>>

Similarly, if I open up a terminal window manually on the remote machine (using remote desktop) that command also opens a py2 one
Code: Select all
 ~    /Library/Application\ Support/Perceptive\ Automation/Indigo\ 2022.1/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -i
Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 19 2020, 20:48:48)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
Connected to Indigo Server v2022.1.0, api v2.5 (DEPRECATED) (localhost:1176)
>>>


I assume this is because the system default python is still 2 for me.

I do have python3 available through that command name
Code: Select all
 /Library/Application Support/Perceptive Automation    which python
/usr/local/bin/python
 /Library/Application Support/Perceptive Automation    which python3
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3
 /Library/Application Support/Perceptive Automation    python --version
Python 2.7.18
 /Library/Application Support/Perceptive Automation    python3 --version
Python 3.10.2
 /Library/Application Support/Perceptive Automation  


So how would I go about getting the INdigoPluginHost to use that version?

Re: Launching an interactive py3 plugin script shell...

PostPosted: Sat May 28, 2022 4:22 pm
by FlyingDiver
DPattee wrote:
So how would I go about getting the INdigoPluginHost to use that version?


Which version? Plugins specify the Python version in the Info.plist. Everything else (embedded scripts, external scripts, Scripting Shell) get Python3.

Re: Launching an interactive py3 plugin script shell...

PostPosted: Sat May 28, 2022 4:30 pm
by DPattee
Ahh, figured it out. Instead of the old

ssh x-user@host -t "/Library/Application\ Support/Perceptive\ Automation/Indigo\ 2022.1/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost" -i

It needs to be

ssh x-user@host -t "/Library/Application\ Support/Perceptive\ Automation/Indigo\ 2022.1/IndigoPluginHost3.app/Contents/MacOS/IndigoPluginHost3" -i

Re: Launching an interactive py3 plugin script shell...

PostPosted: Sat May 28, 2022 4:32 pm
by FlyingDiver
Ah. I always use the menu command at the bottom of the plugins list. :)

Re: Launching an interactive py3 plugin script shell...

PostPosted: Sat May 28, 2022 4:58 pm
by jay (support)
Use the indigo-host symlink we create in /usr/local/indigo (put that on your path) - that way you don't have to worry about file paths (it starts up python3 by default though you can pass --python2 if you want the old one).

Re: Launching an interactive py3 plugin script shell...

PostPosted: Sat May 28, 2022 8:47 pm
by DPattee
Oh, well that's certainly easier than updated it every time there is a new release, thanks!

Re: Launching an interactive py3 plugin script shell...

PostPosted: Sat Jun 18, 2022 7:32 am
by dduff617
sorry if i'm hijacking a thread. when i try to do "Open Scripting Shell" from the menu, a shell window opens containing the following:
Code: Select all
/Applications/Indigo 2022.1.app/Contents/Resources/PlugIns/launch_indigopluginhost.command: line 5: /usr/local/indigo/indigo-host: Permission denied
logout

Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]
ownership and perms for /usr/local/indigo look like they're maybe off? (don't know how this would have happened)
Code: Select all
 #$ ls -ld /usr/local/indigo
drwxrwx---  7 root  wheel  224 Jun 14 19:59 /usr/local/indigo
 #$ /usr/local/indigo/indigo-host
bash: /usr/local/indigo/indigo-host: Permission denied
it's been a long time since i've used indigo's scripting shell... i can work around this specific issue, but figured better to ask here about the proper way to handle - did i perhaps skip a step in the install process that enables this?

Re: Launching an interactive py3 plugin script shell...

PostPosted: Sat Jun 18, 2022 7:40 am
by FlyingDiver
dduff617 wrote:
i can work around this specific issue, but figured better to ask here about the proper way to handle - did i perhaps skip a step in the install process that enables this?


Re-run the installer.

Re: Launching an interactive py3 plugin script shell...

PostPosted: Sat Jun 18, 2022 7:50 am
by dduff617
thanks for the suggestion.

i re-ran installer (Indigo_2022_1_1). the last thing it said was "completed successfully".

when i try "Open Scripting Shell", i get the same error "/Applications/Indigo 2022.1.app/Contents/Resources/PlugIns/launch_indigopluginhost.command: line 5: /usr/local/indigo/indigo-host: Permission denied".

any other ideas?

Re: Launching an interactive py3 plugin script shell...

PostPosted: Sat Jun 18, 2022 8:00 am
by dduff617
i'm not any kind of expert in the mac flavor of unix, but i can see that the user i am logged in as (same as the user that runs the indigo server) is not in the "wheel" group. is that the problem?

it is an "admin" type user (in the basic mac Users and Groups settings).

Re: Launching an interactive py3 plugin script shell...

PostPosted: Sat Jun 18, 2022 11:32 am
by matt (support)
Those files should be owned by root/admin like this:

Code: Select all
drwxrwx---  7 root  admin   224 May 25 17:15 .
drwxr-xr-x  4 root  wheel   128 May 25 10:13 ..
-rwxrwx---  1 root  admin  4638 May 25 15:42 indigo-clean-and-zip-plugin
-rwxrwx---  1 root  admin  7699 May 25 15:42 indigo-host
-rwxrwx---  1 root  admin  5383 May 25 15:42 indigo-restart-plugin
-rwxrwx---  1 root  admin  2484 May 25 15:42 indigo-start
-rwxrwx---  1 root  admin  5332 May 25 15:42 indigo-stop

Are you running the installer under the same user as you are launching Indigo Server? Try deleting the folder /usr/local/indigo folder completely then re-running the installer.

Re: Launching an interactive py3 plugin script shell...

PostPosted: Sat Jun 18, 2022 12:01 pm
by dduff617
i am running installer under the same user that runs the indigo server process.
i did % sudo rm -rf /usr/local/indigo
reran installer (again) with normal options (all boxes checked under "customize" dialog). "installation successful". same as before.
indigo scripting shell now works.

thanks!