WISDEM / CCBlade

A blade element momentum method for analyzing wind turbine aerodynamic performance that is robust (guaranteed convergence), fast (superlinear convergence rate), and smooth (continuously differentiable).
Other
43 stars 39 forks source link

ModuleNotFoundError: No module named '_bem' #11

Closed frostyduck closed 5 years ago

frostyduck commented 5 years ago

I want to use gym-wind-turbine package. According recommendations ([https://github.com/emerrf/gym-wind-turbine]), I have installed using conda the following tools (Anaconda)> conda create --name gwt-devenv python=3.6.2 scipy=0.18.1 zope.interface=4.4.2 m2w64-gcc-fortran=5.3.0. All packages (which includes ccblade) were installed successfully.

Howewer, whan I try to run "import gym_wind_turbine", I receive the following error from CCblade:

ModuleNotFoundError: No module named '_bem'

After that I decided to follow the Wisdem installation instructions. However, after these actions, I have also received the same error. Please help me! (My system is Windows 10).

evan-gaertner commented 5 years ago

The CCBlade module is written in Fortran and wrapped with a python driver. During the installation process, the Fortran source code is compiled to build the python libraries. Based on the error you're receiving, it appears that the Fortran source was not compiled correctly when installing CCBlade.

Without more information, there's only so much I can do to help, but I can at least point you in the right direction. Please see the recently updated WISDEM installation instructions here: https://github.com/WISDEM/WISDEM . You do not need to install all the packages listed in those instructions, but at a minimum you will need CommonSE, Airfoil Preppy, Akima, and CCBlade. It also appears that you're using a quite out of date version of SciPy (0.18.1). I would suggest upgrading to SciPy 1.1 or higher.

If you follow those instructions and CCBlade still fails to install properly, please share the output from running setup.py in the CCBlade directory.

Best, Evan Gaertner

frostyduck commented 5 years ago

Thank you for your prompt reply!

Now in my conda and pip lists I have the folloing installed packages:

CCBlade 1.1.1 Airfoil Preppy 0.1.0 ScyPy 1.2.1. m2w64-gcc-fortran 5.3.0 m2w64-toolchain 5.3.0 ..... .....

However when I try to reinstall Airfoil Preppy, CBlade and install CommonSE, Airfoil (using "python setup.py develop"), I receive the following error

File "C:\Users\843E~1\AppData\Local\conda\conda\envs\gwt-devenv\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 298, in generate_def if _START.match(dump[i].decode()): UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf4 in position 114: invalid continuation byte

I have no idea, why it happened, because before it I have installed successfully, for example, ccblade. Truth, I used pip install -r requirements.txt from https://github.com/emerrf/gym-wind-turbine

evan-gaertner commented 5 years ago

gym-wind-turbine is third party software and was not written, maintained, or supported by NREL staff. Right now it looks like there are conflicts for different packages in your python path. Its likely you will need to deviate from the gym-wind-install instructions, as they are a year out of date and does not appear to be actively maintained.

I would suggest following the wisdem install instructions first (https://github.com/WISDEM/WISDEM), making sure you get CCBlade installed properly, and installing the gym-wind-turbine in that working environment:

If you're successful:

If this procedure does not work, I would suggest contacting the gym-wind-turbine author, as any package incompatibilities are out of our hands.

frostyduck commented 5 years ago

Thank you for your support! I've repeated the wisdem install instructions, but I have met the same error in the step 6 (when installing CommonSE, Akima, and CCBlade; Airfoil Preppy was installed successfully).

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf4 in position 114: invalid continuation byte

I'm afraid, this is not related with gym-wind-turbine. I worked now only with the wisdem library.