Skip to content
New issue

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

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

Already on GitHub? # to your account

Can't run Python measure on Mac M1 #657

Closed
macumber opened this issue Dec 28, 2023 · 0 comments · Fixed by #664
Closed

Can't run Python measure on Mac M1 #657

macumber opened this issue Dec 28, 2023 · 0 comments · Fixed by #664

Comments

@macumber
Copy link
Collaborator

Issue overview

OpenStudio CLI looking for libopenstudiolib.dylib in incorrect location

Current Behavior

stderr: Traceback (most recent call last):
stderr: File "/Applications/OpenStudioApplication-1.7.0-rc1/bin/../Python/openstudio.py", line 47, in <module>
stderr: import openstudioairflow as airflow
stderr: File "/Applications/OpenStudioApplication-1.7.0-rc1/bin/../Python/openstudioairflow.py", line 12, in <module>
stderr: import _openstudioairflow
stderr: ImportError: dlopen(/Applications/OpenStudioApplication-1.7.0-rc1/bin/../Python/_openstudioairflow.so, 0x0004): Library not loaded: @rpath/libopenstudiolib.dylib
stderr: Referenced from: <2EF0357C-4D3E-3F51-A3F5-008565FD679B> /Applications/OpenStudioApplication-1.7.0-rc1/Python/_openstudioairflow.so
stderr: Reason: tried: '/Applications/OpenStudioApplication-1.7.0-rc1/Python/libopenstudiolib.dylib' (no such file), '/Applications/OpenStudioApplication-1.7.0-rc1/Python/../lib/libopenstudiolib.dylib' (no such file), '/Applications/OpenStudioApplication-1.7.0-rc1/Python/libopenstudiolib.dylib' (no such file), '/Applications/OpenStudioApplication-1.7.0-rc1/Python/../lib/libopenstudiolib.dylib' (no such file), '/opt/homebrew/lib/libopenstudiolib.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libopenstudiolib.dylib' (no such file), '/opt/homebrew/lib/libopenstudiolib.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libopenstudiolib.dylib' (no such file), '/opt/homebrew/lib/libopenstudiolib.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libopenstudiolib.dylib' (no such file)
[openstudio.workflow.OSWorkflow] <Error> Found error in state 'OpenStudioMeasures' with message: 'Error executing Python code'
Timer OpenStudioMeasures with level=0 was not stopped
stderr: Failed to run workflow. Last Error:
stderr: Found error in state 'OpenStudioMeasures' with message: 'Error executing Python code'

Expected Behavior

CLI should look for libopenstudiolib.dylib in correct location and run successfully

Steps to Reproduce

  1. Create Python measure
  2. Add Python measure to workflow
  3. Run workflow

Possible Solution

Either change rpath to include ./bin/ or install libopenstudiolib.dylib to ./lib/. Copying libopenstudiolib.dylib to ./lib/ is a temporary workaround

Details

Environment

Some additional details about your environment for this issue (if relevant):

  • Platform (Operating system, version): M1 MacOS 13.5
  • Version of OpenStudioApplication (if using an intermediate build, include SHA): 1.7.0-rc1

Context

Cannot use Python measures

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant