Launching an interactive py3 plugin script shell...

Posted on
Sat May 28, 2022 4:10 pm
DPattee offline
Posts: 453
Joined: Jan 14, 2004
Location: Redmond, WA

Launching an interactive py3 plugin script shell...

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?

Posted on
Sat May 28, 2022 4:22 pm
FlyingDiver offline
User avatar
Posts: 7213
Joined: Jun 07, 2014
Location: Southwest Florida, USA

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

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.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat May 28, 2022 4:30 pm
DPattee offline
Posts: 453
Joined: Jan 14, 2004
Location: Redmond, WA

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

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

Posted on
Sat May 28, 2022 4:32 pm
FlyingDiver offline
User avatar
Posts: 7213
Joined: Jun 07, 2014
Location: Southwest Florida, USA

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

Ah. I always use the menu command at the bottom of the plugins list. :)

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat May 28, 2022 4:58 pm
jay (support) offline
Site Admin
User avatar
Posts: 18216
Joined: Mar 19, 2008
Location: Austin, Texas

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

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).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat May 28, 2022 8:47 pm
DPattee offline
Posts: 453
Joined: Jan 14, 2004
Location: Redmond, WA

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

Oh, well that's certainly easier than updated it every time there is a new release, thanks!

Posted on
Sat Jun 18, 2022 7:32 am
dduff617 offline
Posts: 660
Joined: Jul 05, 2006
Location: Massachusetts, USA

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

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?

Posted on
Sat Jun 18, 2022 7:40 am
FlyingDiver offline
User avatar
Posts: 7213
Joined: Jun 07, 2014
Location: Southwest Florida, USA

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

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.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Jun 18, 2022 7:50 am
dduff617 offline
Posts: 660
Joined: Jul 05, 2006
Location: Massachusetts, USA

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

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?

Posted on
Sat Jun 18, 2022 8:00 am
dduff617 offline
Posts: 660
Joined: Jul 05, 2006
Location: Massachusetts, USA

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

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).

Posted on
Sat Jun 18, 2022 11:32 am
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

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

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.

Image

Posted on
Sat Jun 18, 2022 12:01 pm
dduff617 offline
Posts: 660
Joined: Jul 05, 2006
Location: Massachusetts, USA

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

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!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest