External script pandas import

Posted on
Tue Feb 15, 2022 4:27 am
zaiks offline
Posts: 19
Joined: May 19, 2016

External script pandas import

I have an external script (python 3.9,10) using pandas (1.4.0) and working ok in PyCharm, but under Indigo when calling it, gives an error
Code: Select all
testscript.py: No module named pandas
ImportError: No module named pandas

How can I make pandas accessible for Indigo?

Posted on
Tue Feb 15, 2022 10:00 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: External script pandas import

Current versions of Indigo do not support Python 3.

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

Posted on
Tue Feb 15, 2022 10:30 am
zaiks offline
Posts: 19
Joined: May 19, 2016

Re: External script pandas import

I know that, but as I can't get to access with python 2.7 due to [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727) error, I was kind of hoping that external script can be used with other version of python

Posted on
Tue Feb 15, 2022 10:34 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: External script pandas import

What version MacOS are you running?

You can still have Indigo run the Py3 script, but you would need to use the "Run Shell Script" command. Then the problem becomes how to get the output of the script back into Indigo. What's the output of the script?

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

Posted on
Tue Feb 15, 2022 1:33 pm
zaiks offline
Posts: 19
Joined: May 19, 2016

Re: External script pandas import

OS X version 10.13 (High Sierra), but input should be multiple variable values of electricity hourly tariffs for heating regulation, Output can also be as txt or dat file that can be read from separate script, but then I have to execute somehow the next script

Posted on
Tue Feb 15, 2022 2:20 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: External script pandas import

zaiks wrote:
I know that, but as I can't get to access with python 2.7 due to [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727) error,


Do you know why you're getting this error? High Sierra should have the right SSL versions. Can you successfully run a Python2 script external to Indigo?

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

Posted on
Tue Feb 15, 2022 2:44 pm
zaiks offline
Posts: 19
Joined: May 19, 2016

Re: External script pandas import

If I use python 2.7 in PyCharm it has the same error, switch over to 3.9 and all ok
OS install is fresh, added only Indigo, Xcode required elements and PyCharm with Python 3.9

Posted on
Tue Feb 15, 2022 2:47 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: External script pandas import

So they're requiring an even newer SSL library than the last round of failures. There's a decent chance of it working in a more recent version of MacOS. Do you have another machine you can test it on? And can your Indigo machine be upgraded?

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

Posted on
Tue Feb 15, 2022 2:52 pm
zaiks offline
Posts: 19
Joined: May 19, 2016

Re: External script pandas import

Unfortunately I cant install Indigo on newer machine as they are all laptops that are in use - old reliable mini has also house management job and probably High Sierra is latest it can handle.
Times ago it was possible to run indigo as trial in other machine for testing - I have no idea weather it's still somehow possible

Edit:
On OS 12.2 it seems I even don't have python2 anymore, to try this - will Indigo install then add their own if I get it here?

Posted on
Tue Feb 15, 2022 3:42 pm
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: External script pandas import

macOS 12.2 does have python 2 installed (from my Mac running macOS 12.2):

Code: Select all
MightyBook:lib jay$ ls -la /System/Library/Frameworks/Python.framework/Versions/2.7/bin
total 0
drwxr-xr-x  26 root  wheel  832 Jan 22 01:42 .
drwxr-xr-x  11 root  wheel  352 Jan 22 01:42 ..
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 2to3 -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 2to3-2 -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 2to3-2.7 -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 2to32.7 -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 idle -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 idle2 -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 idle2.7 -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 pydoc -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 pydoc2 -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 pydoc2.7 -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 python -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 python-config -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 python2 -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 python2-config -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 python2.7 -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 python2.7-config -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 pythonw -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 pythonw2 -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 pythonw2.7 -> pythonwrapper
lrwxr-xr-x   1 root  wheel  113 Jan 22 01:42 pythonwrapper -> /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/pythonwrapper.app/Contents/MacOS/pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 smtpd.py -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 smtpd2.7.py -> pythonwrapper
lrwxr-xr-x   1 root  wheel   13 Jan 22 01:42 smtpd2.py -> pythonwrapper
drwxr-xr-x  24 root  wheel  768 Jan 22 01:42 unwrapped
MightyBook:lib jay$ python

WARNING: Python 2.7 is not recommended.
This version is included in macOS for compatibility with legacy software.
Future versions of macOS will not include Python 2.7.
Instead, it is recommended that you transition to using 'python3' from within Terminal.

Python 2.7.18 (default, Jan  4 2022, 17:47:56)
[GCC Apple LLVM 13.0.0 (clang-1300.0.29.10) [+internal-os, ptrauth-isa=deployme on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ^D

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Feb 15, 2022 3:46 pm
zaiks offline
Posts: 19
Joined: May 19, 2016

Re: External script pandas import

Thanks jay, found that I have both as well (python --version and python3 --version resulted the same 3.x answer)
Now I have to figure out how to install pip to 2.7 for testing my script on newer OS...

Posted on
Tue Feb 15, 2022 4:16 pm
zaiks offline
Posts: 19
Joined: May 19, 2016

Re: External script pandas import

Ok, that has had too much hassle already - I decided to use the round route and write my data to file for other script to read

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 11 guests