-
Notifications
You must be signed in to change notification settings - Fork 208
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
[Enhancement Request] Allow importing Python package with C-extension e.g. numpy #4846
Comments
@Myoldmopar I think this one is related to how E+ manages python and python packages? |
@wta12 Also, have you tried setting the PYTHONPATH env to point to the pip package repo and then run it? e.g. |
I'm happy to help, but I'd need to dive into the way OpenStudio packages and uses EnergyPlus. There is certainly a method for this to work with raw EnergyPlus, although it's admittedly not the most elegant solution. I suspect @jmarrec would have more to offer in the near term, if available. |
* Explicitly insert to sys.path the site-packages and lib-dynload folders from the system python * Pass --python_path twice (site-packages and lib-dynload) * Pass --python_home
I have it fixed locally. But I'd like to discuss with @kbenne about it, because I had to change the Unix (well, Ubuntu to be exact, I think it works on mac...) dlopen flags from On unix, the C native ext are NOT linked to libpython.so. Our libpythonengine.so IS linked to it. CurrentlyMac
Ubuntu 20.04
|
* Explicitly insert to sys.path the site-packages and lib-dynload folders from the system python * Pass --python_path twice (site-packages and lib-dynload) * Pass --python_home
#4846 - Allow importing Python package with C-extension e.g. numpy in the labs CLI
Enhancement Request
Allow importing package with C-extension e.g. numpy
Detailed Description
OS SDK 3.5.1 returns error if execute python script with numpy as dependencies
"OpenStudio/OpenStudio_3_5_1/bin/openstudio labs --verbose --python_home /usr/local/anaconda3/envs/pythonMeasure --python_path /usr/local/anaconda3/envs/pythonMeasure/lib/python3.8/site-packages execute_python_script python_script_test.py"
Return error:
Possible Implementation:
EP instance in same OS SDK installation allows Plugin:Instance (pythons script) with numpy imported
The text was updated successfully, but these errors were encountered: