MHKiT-Software / MHKiT-MATLAB

MHKiT-MATLAB provides the marine renewable energy (MRE) community tools for data processing, visualization, quality control, resource assessment, and device performance.
https://mhkit-software.github.io/MHKiT/
BSD 3-Clause "New" or "Revised" License
15 stars 23 forks source link

MHKiT-Matlab Python recognition issues #46

Closed t-osu closed 3 years ago

t-osu commented 3 years ago

I successfully installed python,pycharm,mhkit,and the related packages and ran the example river code from the installation page with no issues. However I am having quite a bit of trouble with matlab recognizing mhkit. Using gitbash I cloned MHKiT-MATLAB, put it in my Matlab path, and then navigated to that folder in my windows terminal and ran pip install -e . As per instructions. In matlab I ran pyversion and read out what the installation page notes. I double checked the place executable, library, and home were going to and they are correct. Finally I double clicked mhkit.mltbx and installed it with a note telling me that it got installed and was enabled. Unfortunately, when I try the test code from the installation page, I get multiple different errors.

I have repeated the Python and Matlab installation multiple times to make sure I didn't overlook anything, yet this didn't help. Any ideas?

Supplementary info -->

Python version: 3.9 Matlab version: 2020b update 4

Specific errors I get upon opening Matlab right away: [x,y]=circular(30) Error using h5>init h5py.h5 (line 1) Python Error: ImportError: DLL load failed while importing defs: The specified procedure could not be found. Error in version><module> (line 15) Error in __init__><module> (line 33) Error in multi_file_resource><module> (line 5) Error in __init__><module> (line 8) Error in hindcast><module> (line 3) Error in __init__><module> (line 3) Error in __init__><module> (line 2) Error in __init__><module> (line 1) Error in <frozen importlib>_call_with_frames_removed (line 228) Error in <frozen importlib>exec_module (line 790) Error in <frozen importlib>_load_unlocked (line 680) Error in <frozen importlib>_find_and_load_unlocked (line 986) Error in <frozen importlib>_find_and_load (line 1007) Error in <frozen importlib>_gcd_import (line 1030) Error in __init__>import_module (line 127)

rpauly18 commented 3 years ago

Hi Chris,

Did you install MHKiT-Python with a pip install or by cloning the repo? Can you also provide the print out from typing "pip list" in a terminal window? It looks like there is an issue with one of the python packages MHKiT uses.

ssolson commented 3 years ago

@t-osu Matlab does not support Python 3.9 see https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/python-compatibility.pdf

I am getting the same error in python 3.8. I am going to close this issue. Please follow/ watch what Rebecca and I do to solve this issue on #49 and let us know if what we come up with does not solve your issue as well.