Closed frostyduck closed 4 years ago
No module named '_bem' results from an improper compiling of fortran modules, so CCBlade and Akima. This is reflected in the second error where there is a mingw error. I'm surprised you're having so much trouble, so I'm going to see if I can reproduce this. Please share as much information about your system and software versions as possible, especially what version of anaconda and python you're using, 64 vs 32 bit, etc. Also please share the output of 'conda list' from your active conda environment.
The information about my system OS Windows (64 bit) Python 3.7.3. Anaconda 3 (version 4.6.14)
I have two conda environments: 1) gwt-devenv, which includes the installed CCblade with the error No module named '_bem'
and 2) wisdem-env, which I created regarding the wisdem install instructions (without installed CCblade, because I can not install ccblade because a mingw error).
(wisdem-env) C:\Users\Никита>conda list
Name Version Build Channel
airfoilprep 0.1.0 dev_0
This seems like an encoding problem I have encountered before. At a command line do:
python -c "import sys; print(sys.getdefaultencoding())"
On my computer I get utf-8
, but I'm guessing you get something else. In the CCBlade setup.py, I would try deleting the first two lines:
#!/usr/bin/env python
#encoding: utf-8
and instead add in:
import sys
sys.setdefaultencoding('X')
where X is the string returned by the default encoding query above
This seems like an encoding problem I have encountered before. At a command line do:
python -c "import sys; print(sys.getdefaultencoding())"
On my computer, I get the sameutf-8
and instead add in:
import sys
sys.setdefaultencoding('X')
I did it, but I get the following error:
AttributeError: module 'sys' has no attribute 'setdefaultencoding'
Sorry I forgot one line:
import sys
reload(sys)
sys.setdefaultencoding('X')
It looks like from your earlier post you may have some Greek characters that python encounters? Is that encoding typically "iso8859-7". You could also give that a whirl. Sorry we don't have a definitive debugging path forward for you on this yet.
You might also try "utf-16"
I'm using Python 3.7.3 and the use of sys.setdefaultencoding()
has become a no-op in py3k. I get again the same error. I'm from Russia and maybe some problem in Russian characters. However I tryed also to install WISDEM on computer without Russian characters and I have the same problem.
Did the akima-module install cleanly for you? That also uses Fortran with the mingw compilers. You can test by doing import akima
. Maybe just removing those first two lines in the CCBlade setup.py file would help too, without trying to hard-set the encoding.
When I'm trying to install akima, I get the same error UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf4 in position 114: invalid continuation byte
Well, sorry to hear about that problem as well, but at least that is consistent. What about a C/C++-based module like pBeam or pyFrame3DD?
Well, sorry to hear about that problem as well, but at least that is consistent. What about a C/C++-based module like pBeam or pyFrame3DD?
What do you mean? Should I try to install this modules in my conda environment?
If you wouldn't mind, yes please git clone
one of those modules (pBeam
or pyFrame3DD
) and try to do python setup.py develop
in your conda environment. We have been trying to assess if this is a Fortran-specific issue or just any time mingw is called.
I earlier wrote in ccblade running error in this post. I received the following error from CCblade:
ModuleNotFoundError: No module named '_bem'
After that I decided follow the wisdem install instructions very close, that make sure I get CCBlade installed properly. I tryed to install only CommonSE, Airfil Preppy, Akima, and CCBlade (from the Wisdem library).
However I have met with the following new error in the step 6 (when installing CommonSE, Akima, and CCBlade; Airfoil Preppy was installed successfully):
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 repeated it at other computer and received the same error. I tryed also to change numpy versions (because the error related something with mingw32ccompiler file), but it have not help.