Questions and discussion for this lecture live here. Fire away by hitting Reply below
Hi, I am having trouble importing the OpenSeesPy library in Github Codespaces. When running the app with import openseespy.opensees as ops I am getting the following error:
File “/workspaces/structural-app/venv/lib/python3.12/site-packages/openseespy/opensees/init.py”, line 14, in
raise RuntimeError(‘Failed to import openseespy on Linux.’)
RuntimeError: Failed to import openseespy on Linux.
It is properly something that I am missing, but I can’t seem to find any answers online and I just followed your tutorial. I hope you can help me.
Hi @Rasmus_Nielsen, this is strange - I’m guessing that as far as you can tell you’ve followed the tutorial line for line.
I wonder if you should try installing the exact same version of OpenSeesPy that I used in the tutorial, so execute:
pip uninstall openseespy
pip install openseespy==3.5.1.12
There may be something about later versions that the Codespace is having an issue with. We’re currently on version 3.7.1.2, so there may have been some behind the scenes changes since I published this project with version 3.5.1.12.
Let me know how you get on.
S
Hi @Sean, I tried with both versions of OpenSeesPy in Codespaces, but kept getting the error about not being able to import it on Linux. Finally, I tried downloading VIKTOR for local developement and I manage to get it working.
However, it seems like there is a bug in VIKTOR as I manually had to copy the OpenSeesPy package into the VIKTOR-app directory on my computer. I wrote to VIKTOR support team to make them aware of my issues with the OpenSeesPy package. Thanks again for your help.
Glad you were able to move forward.
Also, not sure if you’ve come across it, but the Viktor forum is actually very helpful - it’s a discourse forum, just like this one, but full of Viktor users - worth a look.
Seán