Comments (2)
Hi @solub,
Thank you for trying the plugin! Numba is only half compatible with GHPythonRemote, you can import modules that use numba but cannot import numba and call jit
on IronPyton code.
While it's possible to use numba on the CPython side of the connection, it's not possible to cross the interface and use it on functions defined on the IronPython side. The problem is that numba needs to access the bytecode of the function to be JITed, and GHPythonRemote does not know how to transfer that. I don't even know of a way to access that information on IronPython like on CPython (I initially tried to transfer the function to the CPython side with a utility from RPyC, but that's trying to access function properties that are not defined in the IronPython implementation).
So the best you can do is code everything that needs to use numba in a separate CPython module, and add this module to the list of modules to import through GHPythonRemote. The module needs to be importable by your CPython installation (rhinoremote virtual environment, probably), that is be in its python path. I find the easiest way to achieve that is to create a package with a simple setup.py
file, and use an editable install: pip install -e .
(run this from the folder containing the setup.py
file, with rhinoremote
activated).
There is an example project layout with a simple setup.py here.
from ghpythonremote.
Thank you so much for the kind reply and the comprehensive explanation. This is very helpful.
from ghpythonremote.
Related Issues (20)
- CPython_to_GH.py invoke Rhino 5.0 in a RH6 context HOT 1
- "No handlers could be found for handler "GH..."" in CPython to GH context
- importing methods from "ortools" library HOT 6
- Python 3+ support HOT 1
- Installation issue - Runtime error (ArgumentTypeException): expected buffer, got bytes HOT 1
- Propagate runtime messages through user object
- MacOS compatibility HOT 2
- ghPythonRemote for Python v3+ ? HOT 1
- GUIs (Matplotlib, OpenCV) segmentation fault on MacOS
- On MacOS, the GH panel does not print the ouput string in GH_to_CPython.ghx example
- Missing example files HOT 4
- Install gh-python-remote HOT 3
- On MacOS, `get_python_from_path` fails -- does not follow symlinks?
- Grasshopper crashes when adding time and datetime libraries HOT 1
- GH Python remote with Sympy HOT 4
- Runtime error (ImportException): No module named ghpythonremote HOT 6
- Problem running example files HOT 2
- some modules work failed -"Runtime error (SyntaxErrorException): invalid syntax" HOT 1
- "Location" is inside Docker container HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghpythonremote.