# Importing Openseespy in dynamo sandbox

**URL:** <https://forum.dynamobim.com/t/importing-openseespy-in-dynamo-sandbox/106022>\
**Category:** Uncategorized\
**Tags:** python, dynamo\
**Created:** [November 21, 2024, 1:09pm UTC](https://forum.dynamobim.com/t/importing-openseespy-in-dynamo-sandbox/106022 "2024-11-21T13:09:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaafar\_Al\_Nasire](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jaafar_al_nasire/32/92812_2.png) [@Jaafar\_Al\_Nasire](https://forum.dynamobim.com/u/Jaafar_Al_Nasire)\
**Post date:** [November 21, 2024, 1:09pm UTC](https://forum.dynamobim.com/t/importing-openseespy-in-dynamo-sandbox/106022/1 "2024-11-21T13:09:02Z")

</div>

I am using dynamo sandbox 3.4 and it uses python 3.9.12  
i recently downloaded the opensees  
when i am trying to import the package it says “Failed to import openseespy on Windows”

 ![Screenshot 2024-11-21 152305](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/2/c2ec7867ef35b3310cafc8674cba0ee6ed3f6c54.jpeg)

---

<div class="post-metadata">

**Author:** ![Brendan\_Cassidy](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/brendan_cassidy/32/7685_2.png) [@Brendan\_Cassidy](https://forum.dynamobim.com/u/Brendan_Cassidy)\
**Post date:** [November 21, 2024, 5:52pm UTC](https://forum.dynamobim.com/t/importing-openseespy-in-dynamo-sandbox/106022/2 "2024-11-21T17:52:16Z")

</div>

Lots of python modules have to be installed in specific ways, therefore did you install it in the official method that OpenSeeSpy indicate?

If not then follow the post somewhere on the forum for how to utilise PIP in dynamo to install a module.

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [November 22, 2024, 2:51am UTC](https://forum.dynamobim.com/t/importing-openseespy-in-dynamo-sandbox/106022/3 "2024-11-22T02:51:11Z")

</div>

See discussion here [Using matplotlib in dynamo to create images for Openseespy and Opsvis](https://forum.dynamobim.com/t/using-matplotlib-in-dynamo-to-create-images-for-openseespy-and-opsvis/103624) and [How to install Python modules in Dynamo Core Runtime 2.8.0? - #80 by Mike.Buttery](https://forum.dynamobim.com/t/how-to-install-python-modules-in-dynamo-core-runtime-2-8-0/52922/80)

---

<div class="post-metadata">

**Author:** ![Jaafar\_Al\_Nasire](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jaafar_al_nasire/32/92812_2.png) [@Jaafar\_Al\_Nasire](https://forum.dynamobim.com/u/Jaafar_Al_Nasire)\
**Post date:** [November 27, 2024, 9:22am UTC](https://forum.dynamobim.com/t/importing-openseespy-in-dynamo-sandbox/106022/4 "2024-11-27T09:22:56Z")

</div>

@Mike.Buttery @Brendan_Cassidy  
thank you for your response  
i did what the openseespy installation requirements want but it returned different error  
it says python 3.10 is needed  
while i checked cpython 3 is using python 3.9.12  
is there any workaround or upgrading python for dynamo to run this package on dynamo

 ![Screenshot 2024-11-27 121756](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/6/c603c55b5e296b89ba8bb657695dbdbc8c4d723c.png)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [November 27, 2024, 11:09am UTC](https://forum.dynamobim.com/t/importing-openseespy-in-dynamo-sandbox/106022/5 "2024-11-27T11:09:17Z")

</div>

Think you need to use an olderversion of OpenSeesPy. Their GitHub indicates they work with Python versions as far back as 3.4.

---

<div class="post-metadata">

**Author:** ![Jaafar\_Al\_Nasire](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jaafar_al_nasire/32/92812_2.png) [@Jaafar\_Al\_Nasire](https://forum.dynamobim.com/u/Jaafar_Al_Nasire)\
**Post date:** [November 27, 2024, 7:09pm UTC](https://forum.dynamobim.com/t/importing-openseespy-in-dynamo-sandbox/106022/6 "2024-11-27T19:09:48Z")

</div>

thanks a lot ❤  
that worked well  
for anyone how is reading this comment **at the time i am writing this** ,  
the latest version of python for dynamo is 3.9.12  
the latest version of openseespy you can work on is 3.4.0.8 (for dynamo)  
you need the following steps  
install python 3.9.0 for windows (insure that this is the current version in your system)  
write in cmd the following code  
pip install openseespy==3.4.0.8  
the package should be successfully installed and you need to get its path ,again write in cmd the following code  
pip -v list  
copy the path for openseespy 3.4.0.8  
add the path in your python node (in dynamo) with the following code after importing sys  
sys.path.append(r’PUT HERE THE COPPIED PATH’)  
in file explorer go to this path open the openseespywin folder (which is inside this path)  
open the file named **init**.py  
replace line number 14 with the following code (pay attention to not deleting existing spaces before code)  
if ‘Tcl86’ in path:  
download and install tcl86 from the following link

> **[magicsplat - Browse /magicsplat-tcl at SourceForge.net](https://sourceforge.net/projects/magicsplat/files/magicsplat-tcl/)**
>
> Umbrella project for various open source projects hosted at SourceForge

add the path of tcl86 to your dynamo python script  
sys.path.append(r’C:\Users(YOUR COMPUTER NAME)\AppData\Local\Apps\Tcl86\bin’)  
and i hope anyone who want to integrate opensees into revit best wishes 😍  
so far the above workflow i suffered to understand for 1 week until i successfully imported openseespy in my dynamo python node
