I have tried to import scipy via using pip install in the ‘sys’ directory.
However, instead of obtaining the .py file, a new folder is inside (scipy folder).
When importing it in GHPython (import scipy
), this message is obtained: Runtime error (SyntaxErrorException): unexpected token 'from'
Japhy
(Japhy)
January 10, 2024, 4:01pm
2
Hi Alfredo,
Please this guide for using packages in the Rhino 8 ScriptEditor
Thanks @Japhy , but I do not have Rhino 8. I have 7 version instead.
Japhy
(Japhy)
January 10, 2024, 4:09pm
4
That requires python 3.9 which wouldn’t be supported in Rhino 7 environment.
It’s not so much a version issue, but that GHPython is IronPython, which is not directly compatible with e.g. numpy and scipy.
Ok, so updating to Rhino 8 is necessary to import scipy…
There are workarounds (try doing a search here on Discourse), but none of them are particularly worthwhile. If you can, the path of least resistance is likely to upgrade to Rhino 8.