Facing below problem while linking CoolProp with MATLAB
이전 댓글 표시
pyversion
version: '2.7'
executable: 'C:\Users\Shehryar Ishaque\Anaconda2\python.EXE'
library: 'C:\Users\Shehryar Ishaque\Anaconda2\python27.dll'
home: 'C:\Users\Shehryar Ishaque\Anaconda2'
isloaded: 0
>> [v,e] = pyversion; system([e,' -m pip install --user -U CoolProp'])
'C:\Users\Shehryar' is not recognized as an internal or external command,
operable program or batch file.
ans =
1
채택된 답변
추가 답변 (1개)
Shanmukha Voggu
2021년 12월 27일
편집: Shanmukha Voggu
2021년 12월 27일
0 개 추천
Hi naveed,
system(command) calls the operating system to execute the specified command.
If you want to run multiple commands, use && between consecutive commands for windows
Refer to documentation of system
Hope this helps!
댓글 수: 3
[v,e] = pyversion;
array = [e,' -m pip install --user -U CoolProp']
whos array
array
This tells us that the result of [e,' -m pip install --user -U CoolProp'] is a character vector, as required by system() .
The problem is not in the fact that the character vector is constructed instead of being static. The constructed character vector is as valid for the purpose of system() as if the content of the constructed character vector had been hard-coded in a system() call.
The problem is that the executable name happens to have spaces in it, and Windows is treating those spaces as the end of the command to execute, with the parts after the space being treated as parameters or options to the call. The cure is to ensure that the path to the executable is quoted when it goes into system()
Shanmukha Voggu
2021년 12월 27일
Thanks for clarification.
NAVEED ULLAH
2021년 12월 28일
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
