# How to install libraries like SciPy into Rhino 8 beta script editor?

**URL:** <https://discourse.mcneel.com/t/how-to-install-libraries-like-scipy-into-rhino-8-beta-script-editor/167130>\
**Category:** Grasshopper\
**Tags:** windows, python, scipy, rhino8\
**Created:** [October 12, 2023, 10:01am UTC](https://discourse.mcneel.com/t/how-to-install-libraries-like-scipy-into-rhino-8-beta-script-editor/167130 "2023-10-12T10:01:01Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![Sebastian\_Rasmussen](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/sebastian_rasmussen/32/566407_2.png) [@Sebastian\_Rasmussen](https://discourse.mcneel.com/u/Sebastian_Rasmussen)\
**Post date:** [April 25, 2024, 7:09pm UTC](https://discourse.mcneel.com/t/how-to-install-libraries-like-scipy-into-rhino-8-beta-script-editor/167130/24 "2024-04-25T19:09:26Z")

</div>

@eirannejad

Thank you for your response. As I’m fairly new to coding, I’m having a bit of trouble understanding whether it’s possible or not to import the abqpy library into Grasshopper, based on your message.

If it is possible to implement the abqpy library in Grasshopper, do you have any ideas on how I should do it?

OR Would it perhaps be possible to create a Grasshopper component that incorporates the library abqpy through C#, thereby bypassing GhPython?

---

<div class="post-metadata">

**Author:** ![James\_Parrott](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/james_parrott/32/713265_2.png) [@James\_Parrott](https://discourse.mcneel.com/u/James_Parrott)\
**Post date:** [April 26, 2024, 11:53am UTC](https://discourse.mcneel.com/t/how-to-install-libraries-like-scipy-into-rhino-8-beta-script-editor/167130/25 "2024-04-26T11:53:38Z")

</div>

It’s not possible to import `abqpy` and get it to work correctly as it is, without a lot of further work.  
I think it would be possible to create a fork of `abqpy` that works inside a Grasshopper Python 3 component.

I don’t like to say anything is impossible in Python, but incorporating one closed-source proprietary environment inside another (on a closed-source proprietary operating system) is the worst case scenario, even with Python to help. I have run an open-source application from Grasshopper before, and that would work with any command line application (basically just call `subprocess.run` on it).

If the ` __main__ ` import config process is the only problem to be solved, perhaps it only requires a week or two’s work. Without knowing more about how Abaqus has changed since 25 years ago (it requires a license, or at least requesting a demo from 3DS) that could easily stretch into months however.

All is not lost though. 3DS and Abaqus do not have exclusive rights to the Finite Element Method. There are other great FEM frameworks for Grasshopper and Rhino.

Also, I’d have thought it’s possible to import Abaqus meshes into Rhino somehow (even if via `.dwg` for example). They used to be simple node and edge lists.

---

<div class="post-metadata">

**Author:** ![xliotx](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/xliotx/32/520428_2.png) [@xliotx](https://discourse.mcneel.com/u/xliotx)\
**Post date:** [April 28, 2024, 10:33am UTC](https://discourse.mcneel.com/t/how-to-install-libraries-like-scipy-into-rhino-8-beta-script-editor/167130/26 "2024-04-28T10:33:27Z")

</div>

It seems the python Rhino 8 uses is located under：  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/3/f/b/3fbad71d0a5f7e5b451853fef842d23dbefa917a.png)

But unlike normal venv, there’s no “active” script inside the `Scripts` folder. Not sure how we can enter the env and install customized packages… Perhaps McNeel doesn’t want us to do sth like this as more bugs may appear?

Got this answer:

> [@New python editor venv](https://discourse.mcneel.com/t/new-python-editor-venv/165673/3):
>
> Not at the moment. The problem is that we are running in a Rhino process so can not load multiple python 3 versions. Supporting separate envs to install pip packages is also a little tricky. For example numpy uses c-libraries that when they are loaded, they can’t be unloaded. So you can’t really install a specific numpy version in one env and another version in another env and have them both successfully work inside Rhino. I’m looking at options to improve this continously.

---

<div class="post-metadata">

**Author:** ![mwickerson](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mwickerson/32/501104_2.png) [@mwickerson](https://discourse.mcneel.com/u/mwickerson)\
**Post date:** [May 1, 2024, 11:27pm UTC](https://discourse.mcneel.com/t/how-to-install-libraries-like-scipy-into-rhino-8-beta-script-editor/167130/27 "2024-05-01T23:27:24Z")

</div>

I feel like I am coning late to this forum but thanks to the content I have been able to get all my python advanced libraries up and running. I desired to figure this out in the summer of 2021 with the ghpython-remote node but here it is for what it is worth. Thankyou everyone on this forum and at McNeels.

Passionately curious, Michael Wickerson, Wickerson Studios

Youtube Instructional Tutorial: Machine Learning Python 3.0 Libraries into Grasshopper  
link: [How to Load Python 3.0 Libraries into Grasshopper for Rhino8 Script Editor Node (youtube.com)](https://www.youtube.com/watch?v=vVcxtBpS3Y8)

---

<div class="post-metadata">

**Author:** ![eirannejad](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/eirannejad/32/775509_2.png) [@eirannejad](https://discourse.mcneel.com/u/eirannejad)\
**Post date:** [May 30, 2024, 10:40pm UTC](https://discourse.mcneel.com/t/how-to-install-libraries-like-scipy-into-rhino-8-beta-script-editor/167130/30 "2024-05-30T22:40:53Z")

</div>

**Update:**

> [@Problem using CPython Libraries](https://discourse.mcneel.com/t/problem-using-cpython-libraries/179356/13):
>
> A major case where this error happens seems to be related to package install failures in pip. Sometimes when pip is trying to install a package that has a numpy dependency (or any other module for that matter), it tries to delete the existing numpy installation and WILL fail if numpy is already loaded inside of Rhino (e.g. \_multiarray\_umath.cp39-win\_amd64 dll is locked and can not be removed). So we end up with an invalid environment that contains a folder named numpy but with half the internal …

---

<div class="post-metadata">

**Author:** ![matinkabiri](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/matinkabiri/32/525033_2.png) [@matinkabiri](https://discourse.mcneel.com/u/matinkabiri)\
**Post date:** [August 8, 2024, 5:45pm UTC](https://discourse.mcneel.com/t/how-to-install-libraries-like-scipy-into-rhino-8-beta-script-editor/167130/32 "2024-08-08T17:45:26Z")

</div>

Oh actually I’m part of the team behind Giraffe it does exactly what you need it’s currently user object files but you if a few day we will make a full-fledged version.

---

<div class="post-metadata">

**Author:** ![Anand\_Shah1](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/anand_shah1/32/626306_2.png) [@Anand\_Shah1](https://discourse.mcneel.com/u/Anand_Shah1)\
**Post date:** [November 14, 2024, 4:48pm UTC](https://discourse.mcneel.com/t/how-to-install-libraries-like-scipy-into-rhino-8-beta-script-editor/167130/33 "2024-11-14T16:48:03Z")

</div>

I tried installing scipt inside cmd like below

pip install scipy --target system path

after which I tried to import scipy in Rhino8 python with below code:

import sys  
sys.path.append(“C:\Users\Lenovo\.rhinocode\py39-rh8\Scripts”)  
import scipy

But I get below error. Also tried reinstalling scipy but doesnt help:  
Error running script: The `scipy` install you are using seems to be broken, (extension modules cannot be imported), please try reinstalling. [3:1]

Anyhelp would be highly appreciated!

Thanks,  
Anand

---

<div class="post-metadata">

**Author:** ![Japhy](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/japhy/32/487647_2.png) [@Japhy](https://discourse.mcneel.com/u/Japhy)\
**Post date:** [November 14, 2024, 4:50pm UTC](https://discourse.mcneel.com/t/how-to-install-libraries-like-scipy-into-rhino-8-beta-script-editor/167130/34 "2024-11-14T16:50:49Z")

</div>

Hi Anand,

Please see the documentation in these regards

> **[Using Python Packages](https://developer.rhino3d.com/guides/rhinopython/python-packages/#python-package-index-pypi)**
>
> This guide covers the various ways to install packages in Python for Rhino.

---

<div class="post-metadata">

**Author:** ![Anand\_Shah1](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/anand_shah1/32/626306_2.png) [@Anand\_Shah1](https://discourse.mcneel.com/u/Anand_Shah1)\
**Post date:** [December 3, 2024, 9:46am UTC](https://discourse.mcneel.com/t/how-to-install-libraries-like-scipy-into-rhino-8-beta-script-editor/167130/35 "2024-12-03T09:46:18Z")

</div>

Hi Japhy,

It works for me now, once I cd to the correct Rhino8 directory. Thanks.

[Previous page](https://discourse.mcneel.com/t/how-to-install-libraries-like-scipy-into-rhino-8-beta-script-editor/167130.md?page=1)
