WISDEM
WISDEM copied to clipboard
meson: error: unrecognized arguments
Hi, everyone.
I am the new user of WISDEM. I encountered a quesiion when I installed WISDEM. When I enter the command line "python setup.py develop", it comes out the error "meson: error: unrecognized arguments: Yao\WISDEM\meson_build"
---------------------Detail of the error--------------------------- (wisdem-env) C:\Users\YX Yao\WISDEM>python setup.py develop ['C:\Users\YX', 'Yao\anaconda3\envs\wisdem-env\Scripts\meson.EXE', 'setup', 'meson_build', '--wipe', '--prefix=C:\Users\YX', 'Yao\WISDEM\meson_build', '-Dpython.purelibdir=.', '-Dpython.platlibdir=.'] usage: meson [-h] {setup,configure,dist,install,introspect,init,test,wrap,subprojects,rewrite,compile,devenv,env2mfile,help} ... meson: error: unrecognized arguments: Yao\WISDEM\meson_build
Traceback (most recent call last):
File "C:\Users\YX Yao\WISDEM\setup.py", line 93, in
How can I install WISDEM if the folder name in the installation path contains Spaces? I will appreciate it if anyone can help me.
The sdist on PyPI is missing the meson.build
and meson_options.txt
files
One can build from the github repo instead:
git clone https://github.com/WISDEM/WISDEM.git
cd WISDEM/
pip install .
cc:L @gbarter
It looks like your windows username, "YX Yao", is causing the script an issue because there is a space-character involved that is being parsed as a separate argument. I will see what I can do to debug that.
The sdist on PyPI is missing the
meson.build
andmeson_options.txt
filesOne can build from the github repo instead:
git clone https://github.com/WISDEM/WISDEM.git cd WISDEM/ pip install .
cc:L @gbarter
@ccoulombe : This is certainly an issue, and is helpful that you called it out in #450. My suspicion is that the error above is due to the space-in-username parsing issue.
@Stephen-cby : Can you try out the develop
branch by doing:
git checkout develop
git pull
and then rerunning the setup command?
Dear @gbarter,
Thanks for your help. I have tried your command, but an error occured.
---------------------detail of the command and error-------------------- (wisdem-env) C:\Users\YX Yao\WISDEM>git checkout develop error: Your local changes to the following files would be overwritten by checkout: setup.py Please commit your changes or stash them before you switch branches. Aborting
I also agree with your opinion that this is space-in-username parsing issue.
@Stephen-cby : Looks like you just need to discard/revert any debugging edits you've made to the files. Try instead:
git restore setup.py
git checkout develop
git pull
python setup.py develop
Dear @gbarter
Thanks for your help. I enconter another error when I do the last command.
------------------Detail of the command and error-------------------- (wisdem-env) C:\Users\YX Yao\WISDEM>python setup.py develop ['C:\Users\YX Yao\anaconda3\envs\wisdem-env\Scripts\meson.EXE', 'setup', 'meson_build', '--wipe', '--prefix=C:\Users\YX Yao\WISDEM\meson_build', '-Dpython.purelibdir=.', '-Dpython.platlibdir=.']
ERROR: Directory is not empty and does not contain a previous build: C:\Users\YX Yao\WISDEM\meson_build
Traceback (most recent call last):
File "C:\Users\YX Yao\WISDEM\setup.py", line 102, in
run_meson_build(staging_dir)
File "C:\Users\YX Yao\WISDEM\setup.py", line 62, in run_meson_build
raise OSError(meson_call, f"The meson setup command failed! Check the log at {setup_log} for more information.")
OSError: [Errno ['C:\Users\YX Yao\anaconda3\envs\wisdem-env\Scripts\meson.EXE', 'setup', 'meson_build', '--wipe', '--prefix=C:\Users\YX Yao\WISDEM\meson_build', '-Dpython.purelibdir=.', '-Dpython.platlibdir=.']] The meson setup command failed! Check the log at meson_build\setup.log for more information.
@Stephen-cby : I think you would have to provide the log file that is mentioned to do any remote debugging. As a first step, I would suggest starting with a fresh build directory and see if you wind up in the same place:
rmdir meson_build
python setup.py develop
Apologies that this is becoming an obstacle. If you continue to encounter errors, you might just consider a conda install of wisdem conda install wisdem
(or mamba install wisdem
depending on which flavor of conda you are using).
Dear @gbarter,
Thanks for your help, though I got more confused. I have tried with a empty build directory and get an error again.
----------------------Detail of the error---------------------------------- (wisdem-env) C:\Users\YX Yao\WISDEM>python setup.py develop ['C:\Users\YX Yao\anaconda3\envs\wisdem-env\Scripts\meson.EXE', 'setup', 'meson_build', '--wipe', '--prefix=C:\Users\YX Yao\WISDEM\meson_build', '-Dpython.purelibdir=.', '-Dpython.platlibdir=.'] The Meson build system Version: 1.1.1 Source dir: C:\Users\YX Yao\WISDEM Build dir: C:\Users\YX Yao\WISDEM\meson_build Build type: native build Project name: wisdem Project version: undefined
meson.build:3:0: ERROR: Compiler gcc can not compile programs.
A full log can be found at C:\Users\YX Yao\WISDEM\meson_build\meson-logs\meson-log.txt
Traceback (most recent call last):
File "C:\Users\YX Yao\WISDEM\setup.py", line 102, in
The mentioned file was attached. meson-log.txt
I have also use conda install of wisdem with conda install wisdem
. It seems sucessful and no error occured. But I can not operate wisdem.
----------------------Detail of the error---------------------------------- (wisdem-env) C:\Users\YX Yao\WISDEM>wisdem nrel5mw.yaml modeling_options.yaml analysis_options.yaml Fatal error in launcher: Unable to create process using '"D:\bld\wisdem_1681847092806_h_env\python.exe" "C:\Users\YX Yao\anaconda3\envs\wisdem-env\Scripts\wisdem.exe" nrel5mw.yaml modeling_options.yaml analysis_options.yaml': ???????????
Could you please tell me how to use wisdem after I used the conda install?
@Stephen-cby : Unfortunately, the error log suggests that the low-level python and compiler commands are also struggling with the space in your username. These are errors that have nothing to do with the WISDEM model or python source.
One option is obviously to change your username, but that might be too disruptive. Another option is to create a new user on your computer that does not have a space in the username. A third option would be to use a linux virtual machine.
Dear @gbarter,
Thanks for your help and suggestions. I decide to create a new username without space.
I can calculate the example of IEA-15-240 now. A million of thanks for you.
Best regards.