jaabell / gmsh2opensees

http://www.joseabell.com
25 stars 5 forks source link

it seen that something happen when I import the package...... #1

Closed alphaDeng closed 9 months ago

alphaDeng commented 1 year ago

when I import gmsh2opensees, python will raise the error: Traceback (most recent call last): File "", line 1, in File "/home/deng/gmsh2opensees-main/gmsh2opensees/init.py", line 18, in from gmsh2opensees.g2o_utils import * File "/home/deng/gmsh2opensees-main/gmsh2opensees/g2o_utils.py", line 12, in import opensees as ops ModuleNotFoundError: No module named 'opensees'

the python is working in linux,the opensees package is openseespy. maybe I should choose openseesRT?

jaabell commented 1 year ago

This particular line might be different depending on how you installed openseespy. I currently compile my own openseespy and don't use the repo version, which is why its different from me. Feel free to change it to what works best for you. If you let me know, then I can probably create a version of the code that automatically chooses the right one depending on configuration.

On Fri, Jan 13, 2023 at 11:48 AM alphaDeng @.***> wrote:

when I import gmsh2opensees, python will raise the error: Traceback (most recent call last): File "", line 1, in File "/home/deng/gmsh2opensees-main/gmsh2opensees/init.py", line 18, in from gmsh2opensees.g2o_utils import * File "/home/deng/gmsh2opensees-main/gmsh2opensees/g2o_utils.py", line 12, in import opensees as ops ModuleNotFoundError: No module named 'opensees'

the python is working in linux,the opensees package is openseespy. maybe I should choose openseesRT?

— Reply to this email directly, view it on GitHub https://github.com/jaabell/gmsh2opensees/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJHQGACBS7NNX5IUACPAJLWSFTKLANCNFSM6AAAAAAT2PUXQM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jaabell commented 1 year ago

Thanks. Are you on a mac? There should be a os.name = "darwin" for mac.

--

José A. Abell, PhD Ingeniero Civil www.joseabell.com

On Sat, May 27, 2023 at 2:39 AM anton surviyanto @.***> wrote:

I change all in gmsh2opensees/g2o_elements_functions.py, gmsh2opensees/g2o_nodes_functions.py, gmsh2opensees/g2o_utils.py, gmsh2opensees/g2o_viz.py and rerun setup.py

if os.name == 'nt': import openseespy.opensees as ops else: #not checked in mac import opensees as ops

into:

if os.name == 'nt': import openseespy.opensees as ops else: #not checked in mac import openseespy.opensees as ops

and it worked for me :)

— Reply to this email directly, view it on GitHub https://github.com/jaabell/gmsh2opensees/issues/1#issuecomment-1565235596, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJHQGEUZ7OMWAQXHLT5W4DXIGOSNANCNFSM6AAAAAAT2PUXQM . You are receiving this because you commented.Message ID: @.***>