Comments (9)
Yes, I just fixed this the past few days. There were changes in the 3rd party libraries that made them a little less robust. If you do:
git checkout develop
git pull
python setup.py develop
In your WISDEM directory, things should be working.
If you instead installed WISDEM as a conda package, then I can push an update there, but haven't done so yet.
from raft.
The pyHAMS installation did not succeed. There should be a setup.log
and a compile.log
file in the meson_build
directory in your pyHAMS directory. Can you post those?
from raft.
Thank you for the very fast response!
I got the pyHAMS installation working, but now WISDEM is failing. Seems to be an installation error again.
When I install WISDEM the output is as follows:
(raft-env) PS C:\Users\hfleh\WISDEM> python setup.py develop
>>
>>
C:\Users\hfleh\WISDEM\setup.py:7: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
from numpy.distutils.core import Extension, setup
running develop
C:\Users\hfleh\anaconda3\envs\raft-env\lib\site-packages\setuptools\command\easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
C:\Users\hfleh\anaconda3\envs\raft-env\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build_scripts
running egg_info
running build_src
INFO: build_src
INFO: building extension "wisdem.ccblade._bem" sources
INFO: f2py options: []
INFO: adding 'build\src.win-amd64-3.9\build\src.win-amd64-3.9\wisdem\ccblade\fortranobject.c' to sources.
INFO: adding 'build\src.win-amd64-3.9\build\src.win-amd64-3.9\wisdem\ccblade' to include_dirs.
INFO: adding 'build\src.win-amd64-3.9\wisdem\ccblade\_bem-f2pywrappers.f' to sources.
INFO: building extension "wisdem.pyframe3dd._pyframe3dd" sources
INFO: building extension "wisdem.rotorse._precomp" sources
INFO: f2py options: []
INFO: f2py:> build\src.win-amd64-3.9\wisdem\rotorse\_precompmodule.c
Reading fortran codes...
Traceback (most recent call last):
File "C:\Users\hfleh\anaconda3\envs\raft-env\lib\site-packages\numpy\f2py\crackfortran.py", line 393, in readfortrancode
l = fin.readline()
File "C:\Users\hfleh\anaconda3\envs\raft-env\lib\fileinput.py", line 305, in readline
line = self._readline()
File "C:\Users\hfleh\anaconda3\envs\raft-env\lib\fileinput.py", line 369, in _readline
return self._readline()
File "C:\Users\hfleh\anaconda3\envs\raft-env\lib\encodings\ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 6993: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\hfleh\WISDEM\setup.py", line 29, in <module>
setup(
File "C:\Users\hfleh\anaconda3\envs\raft-env\lib\site-packages\numpy\distutils\core.py", line 169, in setup
return old_setup(**new_attr)
[...]
File "C:\Users\hfleh\anaconda3\envs\raft-env\lib\site-packages\numpy\f2py\crackfortran.py", line 395, in readfortrancode
raise Exception(
Exception: readfortrancode: reading wisdem\rotorse\PreCompPy.f90#0 failed with
'ascii' codec can't decode byte 0xce in position 6993: ordinal not in range(128).
It is likely that installing chardet package will help f2py determine the input file encoding correctly.
When I run the example_from_yaml I get the following error:
(raft-env) PS C:\Users\hfleh\RAFT\examples> python example_from_yaml.py
Traceback (most recent call last):
File "C:\Users\hfleh\RAFT\examples\example_from_yaml.py", line 6, in <module>
import raft
File "c:\users\hfleh\raft\raft\__init__.py", line 3, in <module>
import raft.raft_model as model
File "c:\users\hfleh\raft\raft\raft_model.py", line 15, in <module>
import raft.raft_fowt as fowt
File "c:\users\hfleh\raft\raft\raft_fowt.py", line 11, in <module>
from raft.raft_rotor import Rotor
File "c:\users\hfleh\raft\raft\raft_rotor.py", line 19, in <module>
from wisdem.ccblade.ccblade import CCBlade, CCAirfoil
ModuleNotFoundError: No module named 'wisdem'
(raft-env) PS C:\Users\hfleh\RAFT\examples>
Do you have any recommendations of what to do?
from raft.
Thank you! I got WISDEM successfully downloaded, but now errors, when running the example_from_yaml:
(raft-env) PS C:\Users\hfleh> pip install marmot-agents
Requirement already satisfied: marmot-agents in c:\users\hfleh\anaconda3\envs\raft-env\lib\site-packages (0.2.5)
Requirement already satisfied: numpy in c:\users\hfleh\anaconda3\envs\raft-env\lib\site-packages (from marmot-agents) (1.24.0)
(raft-env) PS C:\Users\hfleh\RAFT\examples> pip install simpy
Requirement already satisfied: simpy in c:\users\hfleh\anaconda3\envs\raft-env\lib\site-packages (4.0.1)
(raft-env) PS C:\Users\hfleh\RAFT\examples> python example_from_yaml.py
WARNING: Be sure to pip install simpy and marmot-agents for offshore BOS runs
Traceback (most recent call last):
File "C:\Users\hfleh\RAFT\examples\example_from_yaml.py", line 17, in <module>
model.analyzeUnloaded()
File "c:\users\hfleh\raft\raft\raft_model.py", line 135, in analyzeUnloaded
fowt.calcStatics()
File "c:\users\hfleh\raft\raft\raft_fowt.py", line 286, in calcStatics
if np.float(pballast[j]) == np.float(self.pb[i]): # but only if the index of the ballast mass (density) matches the value of pb
File "C:\Users\hfleh\anaconda3\envs\raft-env\lib\site-packages\numpy\__init__.py", line 284, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'float'
I have made sure to install the necessary libraries. Do you have any suggestions?
from raft.
Since this is a bug in the core RAFT code, I will defer to @mattEhall here before making any code edits.
from raft.
Hello,
I believe this is due to numpy's latest release 1.24. For now one could use an older version of numpy, I downgraded it using:
conda install -c conda-forge numpy=1.23
And now the Raft example from yaml works fine. Hope it helps !
from raft.
Thank you! It's working.
from raft.
Thank you all, for the problems and solutions. I've just pushed a small fix for that last bug (now using float() instead of np.float()). There is also has a small update to allow using CCBlade without the full WISDEM installation (as discussed in #17).
from raft.
I submitted some robustness improvements in the install of both pyHAMS
and WISDEM
. If the primary purpose is to use RAFT, I would suggest simply doing conda install wisdem
to satisfy dependencies. The alternative is to go through the WISDEM installation steps outlined at its Github site.
from raft.
Related Issues (20)
- Question: where I can find WAMIT style hydromechanics files in RAFT? HOT 1
- Question: VolturnUs example not working when setting potModMaster to 0 HOT 4
- Weird behavior HOT 2
- Setting potModMaster to 0 HOT 2
- Error with pyHAMS HOT 2
- Outputting results HOT 4
- Examples may use chain nominal diameter HOT 1
- Missing SharedMooring2.dat HOT 2
- Definitions of yaw misalignment and wind speed height in cases HOT 1
- Options for analysis of semi-taut mooring systems HOT 2
- Cannot create the raft environment on MacOS from raft-env.yaml HOT 10
- Question on raft_rotor.py, IECKaimal, Rot spectrum HOT 1
- Massively parallel directory creation fail
- Wrong Definition of control gains in calcAero function of Rotor.py HOT 4
- Yaw misalignment and Aerodynamic in Parked condition HOT 5
- Moorpy exe HOT 1
- Moorpy execution results HOT 1
- Method for HAMS application HOT 1
- About RAFT Solution Process HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raft.