Using NumPy from GH

Dear experts,

I´m trying to use some Python code in Windows GH following this instructions: Using Numpy SciPy and other CPython libraries in GHPython [McNeel Wiki]

Unfortunately, the installation of the GH Python Remote plugin (upon installing Anaconda 3) dumps the following error:

(rhinoremote) C:\Users\Vigardo> pip install gh-python-remote --upgrade --no-binary=:all:
ERROR: Could not find a version that satisfies the requirement gh-python-remote (from versions: none)
ERROR: No matching distribution found for gh-python-remote

if using “conda create -n rhinoremote python=3.8”, or:

(rhinoremote) C:\Users\Vigardo\Desktop\TEMP>pip install gh-python-remote --upgrade --no-binary=:all:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at Release process - pip documentation v21.2.dev0
Collecting gh-python-remote
Downloading gh-python-remote-1.4.4.tar.gz (120kB)
|################################| 122kB 1.5MB/s
ERROR: Could not find a version that satisfies the requirement rpyc==4.1.5 (from gh-python-remote) (from versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.3.0, 3.4.0, 3.4.1, 3.4.2, 3.4.4, 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.1.2)
ERROR: No matching distribution found for rpyc==4.1.5 (from gh-python-remote)

if using “conda create -n rhinoremote python=2.7

The instructions are for CPython 2.7 version but the current available Setup for the Anaconda virtual environment is for CPython 3.8.

Is there any way to run Python 3.8 code in GH or shoud I try 2.7 version instead?
(I´m not sure if the Python code I´m trying to use will run in 2.7)

Thanks a lot for your kind help!

This looks like the more recent option. I’ve not tried it yet

1 Like

Hi, finally I solved the issue by myself.

For some reason I had to manually install “rpyc” component (using the 2.7 conda):

pip install rpyc

And then, install GH Python Remote into Rhino´s IronPython lib. I had to explicitly indicate the path (as it is said here: GitHub - pilcru/ghpythonremote: A two-way connector to use regular Python from IronPython in Rhino/Grasshopper, and vice-versa.)

python -m ghpythonremote._configure_ironpython_installation “C:\Users\Vigardo\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (Some_long_code)\settings\lib”

I hope this may help somebody in the future, sorry for the inconveniences and thanks for your help!

1 Like

Hi Dharman, it looks very nice!! I´ll take a look in more detail as soon as possible!
Thanks a lot!