Numpy for Rhino 64 bit

Hi

Can anyone advise how a Numpty can get Numpy in Python Code in WIP Rhino 8.0

I have tried and the code editor becomes un responsive just like the guy on the keyboard and I have to end task to stop it.

Roger

Hi @RogerD

What have you tried so far? What code makes Rhino or the code editor to freeze?

To quote another thread (Rhino 8 Feature: RhinoCode (CPython, CSharp) - #44 by nathanletwory):

Did you include a line

# r: numpy

before you do

import numpy

?

Creating a new py3 example file has this at the top:

"""
Note:
This project is work-in-progress and still in its infancy

- Reference to RhinoCommmon.dll is added by default

- You can specify your script requirements like:

    # r: <package-specifier> [, <package-specifier>]
    # requirements: <package-specifier> [, <package-specifier>]

    For example this line will ask the runtime to install
    the listed packages before running the script:

    # requirements: pytoml, keras

    You can install specific versions of a package
    using pip-like package specifiers:

    # r: pytoml==0.10.2, keras>=2.6.0
"""

Hi Pierre,

Today I managed to load Numpy re typed my code and maybe I had a space missing before but when I run any Rhino syntax commands then the editor locks up. I ama total newbie when it comes to python so learning as I go.

Hi Pierre,

Forgot to say if you try to save a script then no file extension is added so cannot be re opened as the browser doesn’t see the file with no extension.

Hi Pierre,

A quick question, when Rhino Code editor is up and running will the script compiler work with Python files to create a plug in ? if so will the compiler also be able to load any external modules used in the script such as numpy etc when it compiles the script.

Please post the code that makes the editor freeze. Does the default file that opens up when you create a new Python script work fine? It imports Rhino.

Thanks, I added this to the bug tracker list: https://mcneel.myjetbrains.com/youtrack/issue/RH-67287

I don’t know whether RhinoCode CPython scripts can be compiled like IronPython scripts. @eirannejad will probably know

@pierrec They can not get compiled like IronPython but we are planning to add “packaging” into RhinoCode so scripts can be bundled like Rhino commands

RH-67287 is fixed in the latest WIP