Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openseespymac ImportError: opensees.so image not found #21

Closed
tomvanmele opened this issue Apr 23, 2020 · 19 comments
Closed

openseespymac ImportError: opensees.so image not found #21

tomvanmele opened this issue Apr 23, 2020 · 19 comments

Comments

@tomvanmele
Copy link

hi,

was trying out the Python bindings for opensees for mac but ran into an ImportError.

Traceback (most recent call last):
  File "/Users/vanmelet/Code/compas_fem/examples/opensees/ElasticTruss.py", line 1, in <module>
    from openseespymac.opensees import *
ImportError: dlopen(/Users/vanmelet/anaconda3/envs/fem/lib/python3.7/site-packages/openseespymac/opensees.so, 2): Library not loaded: /usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/Python
  Referenced from: /Users/vanmelet/anaconda3/envs/fem/lib/python3.7/site-packages/openseespymac/opensees.so
  Reason: image not found

would you have any advice on how to solve this?

thanks!

@tomvanmele
Copy link
Author

same problem on windows. however on linux it works...

@zhuminjie
Copy link
Owner

For mac version, you need install with

pip install openseespymac

@tomvanmele
Copy link
Author

i know. that is what i did

@tomvanmele
Copy link
Author

the .so is present in the package, but it cannot be found/loaded...

@zhuminjie
Copy link
Owner

I am not familiar mac. Can you contact the author of the mac version

https://pypi.org/project/openseespymac/

@tomvanmele
Copy link
Author

okay will do.

but just for your information, the same thing happens on windows with the pip install for windows.

everything works fine on linux though...

@zhuminjie
Copy link
Owner

It should not happen with windows. Do you have multiple versions of Python installed on Windows?

@tomvanmele
Copy link
Author

no i installed it in a separate conda environment.
and i have not other python installed on my system...

conda create -n test python=3.7
conda activate test
pip install openseespy
python
>>> from openseespy.opensees import *

@zhuminjie
Copy link
Owner

I did a fresh install and everything seems okay to me

image

@tomvanmele
Copy link
Author

hmm okay will try again. but the conda based install should be okay right?

@zhuminjie
Copy link
Owner

You can use pip install in a conda environment.

@tomvanmele
Copy link
Author

weird, keeps failing for me.

(fem) C:\Users\vanmelet>pip install openseespy
Collecting openseespy
  Using cached openseespy-3.2.0-py3-none-any.whl (21.1 MB)
Installing collected packages: openseespy
Successfully installed openseespy-3.2.0

(fem) C:\Users\vanmelet>python
Python 3.7.7 (default, Apr 15 2020, 05:09:04) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from openseespy.opensees import *
Traceback (most recent call last):
  File "C:\Users\vanmelet\Anaconda3\envs\fem\lib\site-packages\openseespy\opensees\__init__.py", line 21, in <module>
    from openseespy.opensees.win.opensees import *
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\vanmelet\Anaconda3\envs\fem\lib\site-packages\openseespy\opensees\__init__.py", line 25, in <module>
    raise RuntimeError('Failed to import openseespy. Anaconda is recommended https://www.anaconda.com/distribution/')
RuntimeError: Failed to import openseespy. Anaconda is recommended https://www.anaconda.com/distribution/
>>>

@tomvanmele
Copy link
Author

python version in your environment?

@zhuminjie
Copy link
Owner

zhuminjie commented Apr 24, 2020

Try

import openseespy
print(openseespy.__file__)

it gives the installation location, then go to openseespy/opensees/win/ to check if opensees.pyd is there.

@tomvanmele
Copy link
Author

yup it is there

@zhuminjie
Copy link
Owner

I used the exact python version as yours

image

@tomvanmele
Copy link
Author

okay, again, weird :)
are the bindings generated through pybind?

@zhuminjie
Copy link
Owner

No

@amine-aboufirass
Copy link

I am also having this problem.... Could you reopen please?

zhuminjie added a commit that referenced this issue Nov 30, 2020
0409cdd Merge pull request #360 from yulee/ExpressNewton
dcd1689 Merge pull request #459 from eng-tools/macos-python-make-file
6c66747 Merge pull request #473 from MassimoPetracca/improve-ele-output
df6795b Merge pull request #474 from MassimoPetracca/bugfix-cMass-not-considered
23dcd07 Update TclForceBeamColumnCommand.cpp
c560309 improved truss output
14f2983 Merge pull request #471 from mhscott/master
905450d Merge branch 'master' into master
f91ed22 Adding CBDI3d to project file
ea22e53 Update FourNodeTetrahedron.cpp
7b0010f Merge branch 'master' into ExpressNewton
9e51b79 updating command
251eb84 Merge pull request #444 from MassimoPetracca/add-asd_sma_3k-uniaxial-material
1c61d2c Update PlainHandler.cpp
b534842 Merge pull request #466 from zhuminjie/recoder
f0e8f3a Merge pull request #456 from sewkokot/refactorQuadsTris
46108f9 RemoveRecorder: add RemoveRecorder to Python
71720c7 Recorder: return recorder tag
c2965dc Merge pull request #465 from mhscott/steel4
c02e689 Adding Steel4 to object broker
b5537a3 Merge branch 'master' of git://github.com/OpenSees/OpenSees into cbdi3d
0543369 fmk - ading new Makefile,def for stampede 2
4825e2e Merge pull request #463 from parduino/master
1fda098 Adding J2Cyclic wrapper files ... forgotten in last commit
9023132 Adding wrapper for J2CyclicBoundingSurface3D and J2CylicBoundingSurfacePlaneStrain
228b61b Merge pull request #21 from OpenSees/master
f1ba640 Merge pull request #462 from OpenSees/revert-461-master
6c59699 Revert "Added J2CyclicBoundig3D and J2CyclicBoundingPlaneStrain versions of J2CyclicBounding"
ad2965e Merge pull request #461 from parduino/master
2c470f6 Merge branch 'OpenSees-master'
1582d6c Merge branch 'master' of https://github.com/OpenSees/OpenSees into OpenSees-master
c661593 Modify Makefile for J2CyclicBoundingSurface
4531e94 Adding J2CyclicBoundingSurface3d and J2CyclicBoundingSurfacePlaneStrain
9984acb Merge branch 'master' of git://github.com/OpenSees/OpenSees into cbdi3d
32127b3 Merge pull request #460 from fmckenna/master
33dea61 fmk - commenting out load balancing in PartitionedDomain
9596b82 Added make file for building openseespy on mac.
78cf48e remove misleading stressRecovery keyword from setResponse
b1063b4 Refactor and cleanup for Eight/Four/Nine-node quads and tri el.
71e56fe Merge pull request #455 from zhuminjie/master
168a323 Update OpenSeesPy sub-version
dbe8195 Merge pull request #452 from zhuminjie/particle
3c1e8d8 ParticleGroup: remove print
4d4abdf Merge pull request #454 from aschellenberg74/master
413e2a6 updated Win64 and Win32 project files
10fc0ff Merge branch 'master' of git://github.com/OpenSees/OpenSees into cbdi3d
036ea88 removed useless files
077e0e1 dding small changes for compilation
64846ce Merge pull request #18 from OpenSees/master
a6dc14d ParticleGroup: fix -pointlist option
dbf4876 fmk - removing some files
66f4bc5 Adding a few more files for J2Boundingsurface model
5eb72de Merge branch 'master' of https://github.com/OpenSees/OpenSees
bd3e6c3 fmk - adding simple example
c5133a5 Merge branch 'master' of git://github.com/OpenSees/OpenSees into cbdi3d
4b1de8a Merge pull request #450 from mhscott/localAxes
74c9158 Adding function to return local deflections along element and changing nodeMass to return list
4888942 Merge branch 'master' of git://github.com/OpenSees/OpenSees into cbdi3d
6d87bca Merge pull request #449 from mhscott/fbc3drecorder
638cfd4 Using -section for FBC3d setResponse
d7b11d6 Merge branch 'master' of git://github.com/OpenSees/OpenSees into cbdi3d
9376660 Merge branch 'master' into ExpressNewton
655e82f fmk - and seting git location correctly
0306b61 fmk - fixing instructions
64297f6 Merge branch 'master' of https://github.com/OpenSees/OpenSees
d9b672f fmk - adding build instructions
94234d5 Merge branch 'master' of https://github.com/OpenSees/OpenSees
b5db714 Merge pull request #440 from sewkokot/addStressAtNodes
90f529b Merge pull request #442 from zhuminjie/win
5a37147 update openseespy version for windows
a81548b quad8n, quad9n, Tri31: use static constexpr for numgp and nnodes
b2840ab Revert "fix to array size as constant expressions"
bc59543 add-asd_sma_k3-uniaxial-material
6afdf99 fix to array size as constant expressions
19507b6 add stressAtNodes to Tri31 and fix stress vector size from 12 to 3
912780a add stressAtNodes aka stressRecovery for quad, quad9n, quad8n
d09d8aa Merge pull request #439 from sewkokot/addSixNodeTri
1c5abae Merge pull request #438 from zhuminjie/win
0332ef8 SixNodeTri: add bending_tri6n.py example
a7f2121 SixNodeTri: delete step-by-step calc of stressAtNodes
a20f084 NineNodeQuad: refactor use nip and nnodes variables for clarity
ba0e904 SixNodeTri: refactor stressAtNodes - use loops
11844ae EightNodeQuad: fix the number of Gauss points (9), nnodes is 8
6f97ccd sixNodeTri: minor fixes
454fbe2 SixNodeTri: add set/getResponse 11 stressNodes stressAtNodes
1586bc6 SixNodeTri: use 3 Gauss point rule inside triangle (not on sides)
cb88712 add six node triangle element
d6cbfd1 Update sub-version for python
4020350 Windows 64 project updates for recent changes
b0f6b06 Merge pull request #437 from sewkokot/addNineNodeQuad
94d7a08 Merge pull request #414 from jaabell/master
54de1e8 Merge branch 'master' into ExpressNewton
9fb8427 add NineNodeQuad (quad9n) and EightNodeQuad (quad8n) elements
998788a Merge branch 'master' of git://github.com/OpenSees/OpenSees into cbdi3d
75eef9e Merge pull request #436 from mhscott/elasticBeam3d
3b5f547 Adding releases to 3D elastic beam
ff67b0a Merge pull request #435 from sewkokot/master
d918237 Merge branch 'master' into ExpressNewton
3a9872a Tri31: add body forces as eleLoad -selfWeight option (as in quad)
fe1f514 Merge pull request #433 from mhscott/wrappers
d6cc053 Adding parameter and sensitivity functions to wrapper materials
0b06f32 Merge branch 'master' of git://github.com/OpenSees/OpenSees into cbdi3d
571c00a Update Makefile
3447d8b Update Makefile
0bdbffb Merge branch 'master' of git://github.com/OpenSees/OpenSees into cbdi3d
01ba308 Adding CBDI 3d element to Makefile
975287a Merge pull request #432 from mhscott/cbdi3d
a368dd3 Merge pull request #431 from mhscott/nodeDOFsTcl
2ace7dd Adding 3D CBDI element
095e3b1 Adding nodeDOFs command for Tcl
3379120 Merge branch 'master' of git://github.com/OpenSees/OpenSees into cbdi3d
e6a985b Adding CBDI 3D element command
102ca7c Merge pull request #429 from zhuminjie/openseespy_version
3507693 Adding ops.__version__ variable for openseespy version
a2910ac Merge pull request #420 from zhuminjie/PythonWindows
c28945e Update ID.cpp
cfef8f8 Merge pull request #423 from mhscott/recorderPy
0ede937 Converting ints to strings for recorder conversions
9918ef4 Merge pull request #422 from mhscott/cbdi3d
eba0ec8 Fixing matrix size and adding disp calcs to 2D CBDI element
4a690c8 Merge pull request #421 from mhscott/localAxes
13a5c88 Adding local axes as recorder option
cf694eb Changes to compile OpenSeesPy on Windows due to recent changes
a7a57d5 Merge pull request #418 from mhscott/sectionDisp
e3c1553 Returning section displacement in global directions
1e22669 Merge pull request #417 from mhscott/truss
5c0a2da Changing localForce to return numDOF values instead of one value like basicForce
380239c Update toOpenSeesPy.py
8c2fb29 Merge pull request #416 from mhscott/fbcSubdivide
5c971ec Static allocation of subdivide arrays
126a388 Update ReinforcingSteel.cpp
2ed5f03 Merge pull request #415 from mhscott/fbc2d
99644f4 Making static class variables arrays instead of pointers
8c7ebb6 Update BackgroundMesh.cpp
5ad3534 Merge branch 'master' of github.com:OpenSees/OpenSees
47cf826 * Adds H5DRM to the load patterns when the variable H5DRM_FLAG is set to 'YES' in Makefile.def and the compiler flag -D_H5DRM is defined. * Adds staged versions of loadcontrol and newmark algorithms to the commands.cpp, also new commands to activate/deactive elements.
1859a49 Merge pull request #17 from OpenSees/master
ad6f5ef update ExpressNewton command
c44b947 Merge pull request #413 from mhscott/slmodel
6166112 Adding SLModel.o to Makefile
98fc9e1 Merge pull request #403 from ahartloper/add_sl_model
7a48938 Merge pull request #411 from mhscott/mixedBC
8ad4d7c Changing mixed beam-column input to use beamIntegration objects
2c79b5e Merge pull request #409 from u-anurag/patch-1
8c0aec8 Merge pull request #402 from zhuminjie/ShellDKGT
a0c45c4 add shellDKGQ to the command list.
22f95fd Merge pull request #408 from lcpt/enhance_description
cf26752 Enhance material wrapper description
52bc666 Merge pull request #407 from mhscott/wrappers
07ccc7b Adding more wrapper classes
edb057d Merge pull request #404 from sewkokot/fix_beam_partial_uniform_load
1bc155a partial uniform load: minor cleanup
a52ac67 partial uniform load: fix when fewer args are specified
a4e2e7d partial uniform load: fix the order of args
4a28e21 add command for OPS_DispBeamColumn3dID
ddbd3e3 fix partial uniform load for python
7dcbd28 Fix the material filters.
37bedb8 Merge branch 'master' into add_sl_model
e56db83 Add SLModel v2.
ed9ff54 ShellDKGT: add command name ShellDKGT and shellDKGT
7c603ae Merge branch 'master' of https://github.com/OpenSees/OpenSees
c1aea4b fmk - adding PML
47bfb74 ExpressNewton algorithm ExpressNewton algorithm following Xu et al., 2020 (https://doi.org/10.1002/nme.6456)
ee729fe Fix the vcxproj.filters for materials.
00bbfb2 Add missing mat tags for IMKPinching and IMKPeakOriented.
817ec1d Merge branch 'master' into add_sl_model
d8c4a88 Add the SLModel by Suzuki and Lignos.

git-subtree-dir: opensees
git-subtree-split: 0409cdd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants