Microsoft MVP성태의 닷넷 이야기
개발 환경 구성: 388. Windows 환경에서 Octave 패키지 설치하는 방법 [링크 복사], [링크+제목 복사]
조회: 13924
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 1개 있습니다.)
(시리즈 글이 7개 있습니다.)
개발 환경 구성: 335. Octave의 명령 창에서 실행한 결과를 복사하는 방법
; https://www.sysnet.pe.kr/2/0/11309

개발 환경 구성: 388. Windows 환경에서 Octave 패키지 설치하는 방법
; https://www.sysnet.pe.kr/2/0/11622

개발 환경 구성: 674. WSL 2 환경에서 GNU Octave 설치
; https://www.sysnet.pe.kr/2/0/13319

개발 환경 구성: 675. Windows Octave 8.1.0 - Python 스크립트 연동
; https://www.sysnet.pe.kr/2/0/13320

개발 환경 구성: 676. WSL/Linux Octave - Python 스크립트 연동
; https://www.sysnet.pe.kr/2/0/13321

개발 환경 구성: 677. Octave에서 Excel read/write를 위한 io 패키지 설치
; https://www.sysnet.pe.kr/2/0/13323

.NET Framework: 2108. C# - Octave의 "save -binary ..."로 생성한 바이너리 파일 분석
; https://www.sysnet.pe.kr/2/0/13324




Windows 환경에서 Octave 패키지 설치하는 방법

octave 패키지를 설치하려면 우선 python 2.7.10 버전이 설치되어 있어야 합니다.

python 2.7.10
; https://www.python.org/downloads/

제 경우에 gaussian 함수가 필요했는데,

Function File: gaussian (m)
Function File: gaussian (m, a)
; https://octave.sourceforge.io/signal/function/gaussian.html

위의 도움말 하단에 "Package: signal"이라고 되어 있으므로 이것을 설치해 보도록 하겠습니다. 방법은 "Help" / "Octave Packages" 메뉴를 통해 접근하는 다음의 글로 쉽게 알 수 있습니다.

About Octave Forge
; https://octave.sourceforge.io/

간단하게, Octave 내의 명령행 창에서 "pkg install" 명령어를 내리면 됩니다.

pkg install -forge package_name 

따라서, 제 경우에는 package_name을 "signal"로 해서 실행했는데,

>> pkg install -forge signal
error: the following dependencies were unsatisfied:
   signal needs control >= 2.4

의존성 해결이 안 되었군요. ^^ "control" 패키지가 필요하다고 하니 다시 다음과 같이 의존성이 있는 패키지를 설치해 주면 됩니다.

pkg install -forge control
pkg install -forge signal

참고로, 해당 패키지들은 tar.gz 파일 그대로 다운로드가 가능합니다.

Packages
; https://octave.sourceforge.io/packages.php

만약, signal 패키지(signal-1.4.0.tar.gz)를 다운로드했다면 Octave 프로그램 상단에 "Current Directory"를 tar.gz가 있는 폴더로 변경하거나, 반대로 tar.gz 파일을 "Current Directory"로 복사한 다음 파일명을 직접 입력해 설치할 수도 있습니다.

pkg install signal-1.4.0.tar.gz

(사실, pkg install -forge 명령어로 설치를 해도 "Current Directory"에 해당 파일을 다운로드하고 설치 후 삭제를 합니다.)




파이썬이 없거나, 파이썬 3.x 버전이 실행되도록 PATH에 설정되어 있는 경우에는 pkg install에서 다음과 같은 식의 오류 메시지를 볼 수 있습니다.

>> pkg install -forge signal
...[생략]...
tar: Archive entry has empty or unreadable filename ... skipping.
tar: Archive entry has empty or unreadable filename ... skipping.
tar: Error exit delayed from previous errors.
error: called from
    unpack at line 251 column 5
    untar at line 47 column 5
    install at line 81 column 9
    pkg at line 394 column 9

반드시 2.7.10 버전을 설치하시고 cmd.exe 창에서 "python.exe"를 실행해 본 후 2.7.10 인터프리터가 뜨는지 확인을 해야 합니다. 만약 3.x 버전이 뜬다면 PATH를 2.7.10으로 맞추고 octave.bat을 실행하면 됩니다.




함수를 실행했는데 다음과 같은 식으로 오류가 뜨면,

>> gaussian(9)
error: 'gaussian' undefined near line 1 column 1

해당 패키지가 설치되어 있지 않아서 그런 것입니다. 다음의 도움말을 통해,

List of Functions by Package
; https://octave.sourceforge.io/functions_by_package.php

원하는 함수를 구현한 패키지를 설치하면 됩니다. 하지만, 패키지의 함수를 실행하려면 명시적으로 로드를 해야 합니다.

>> gaussian(9)
error: 'gaussian' undefined near line 1 column 1

>> pkg load signal

>> gaussian(9)
ans =

  3.3546e-004
  1.1109e-002
  1.3534e-001
  6.0653e-001
  1.0000e+000
  6.0653e-001
  1.3534e-001
  1.1109e-002
  3.3546e-004

>> help gaussian
'gaussian' is a function from the file C:\Octave\OCTAVE~1.1\share\octave\packages\signal-1.4.0\gaussian.m
...[생략]...




설치 시 다음과 같은 오류가 발생할 수 있습니다.

>> pkg install -forge signal
medfilt1.cc: In member function 'void sorted_window::init(const double*, octave_idx_type, octave_idx_ty
pe, octave_idx_type)':
medfilt1.cc:91:42: error: 'bzero' was not declared in this scope
       bzero (buf, zeros * sizeof (double));
                                          ^
make: *** [medfilt1.oct] Error 1
make: Entering directory `/tmp/oct-ZNzODD/signal-1.4.0/src'
C:/Octave/OCTAVE~1.1/bin/mkoctfile-4.2.1.exe -Wall -Wno-deprecated-declarations  __fwht__.cc -o __fwht_
_.oct
C:/Octave/OCTAVE~1.1/bin/mkoctfile-4.2.1.exe -Wall -Wno-deprecated-declarations  __ultrwin__.cc -o __ul
trwin__.oct
C:/Octave/OCTAVE~1.1/bin/mkoctfile-4.2.1.exe -Wall -Wno-deprecated-declarations  -c cl2bp.cc -o cl2bp.o

C:/Octave/OCTAVE~1.1/bin/mkoctfile-4.2.1.exe -Wall -Wno-deprecated-declarations  -c cl2bp_lib.cc -o cl2
bp_lib.o
C:/Octave/OCTAVE~1.1/bin/mkoctfile-4.2.1.exe -Wall -Wno-deprecated-declarations  cl2bp.o cl2bp_lib.o -o
 cl2bp.oct
C:/Octave/OCTAVE~1.1/bin/mkoctfile-4.2.1.exe -Wall -Wno-deprecated-declarations  medfilt1.cc -o medfilt
1.oct
make: Leaving directory `/tmp/oct-ZNzODD/signal-1.4.0/src'

pkg: error running `make' for the signal package.
error: called from
    configure_make at line 95 column 9
    install at line 192 column 7
    pkg at line 394 column 9

검색해 보면, 이에 대한 이슈가 나옵니다.

bug #53849: [octave forge] (signal) error building medfilt1.cc on Windows
; https://savannah.gnu.org/bugs/?53849

따라서 "https://hg.mtmxr.com/octave-signal/archive/3cbff3de1ebc.tar.gz" 파일을 다운로드해 "signal-1.4.0.tar.gz" 파일명으로 변경 후 "pkg install" 명령어로 설치해 줍니다.

>> pkg install signal-1.4.0.tar.gz
For information about changes from previous versions of the signal package, run 'news signal'.




원래 pkg install이 링크로도 가능한 것 같은데, 제 경우 다음과 같이 오류가 발생했습니다.

>> pkg install  https://hg.mtmxr.com/octave-signal/archive/3cbff3de1ebc.tar.gz
warning: file https://hg.mtmxr.com/octave-signal/archive/3cbff3de1ebc.tar.gz does not exist

그래서 3cbff3de1ebc.tar.gz 파일을 다운로드해 다시 시도를 해봤지만,

>> pkg install octave-signal-3cbff3de1ebc.tar.gz
package name 'signal' doesn't correspond to its filename 'octave-signal-3cbff3de1ebc.tar'
error: called from
    install at line 119 column 11
    pkg at line 394 column 9

이번에는 파일 명이 잘못되었다고 합니다. 그래서 octave-signal-3cbff3de1ebc.tar 파일을 signal-1.4.0.tar.gz로 이름 변경 후 설치를 했고 정상적으로 동작을 했습니다.




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]

[연관 글]






[최초 등록일: ]
[최종 수정일: 7/23/2018]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




1  2  3  [4]  5  6  7  8  9  10  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
13534정성태1/21/20242247닷넷: 2207. C# - SQL Server DB를 bacpac으로 Export/Import파일 다운로드1
13533정성태1/18/20242458닷넷: 2206. C# - TCP KeepAlive의 서버 측 구현파일 다운로드1
13532정성태1/17/20242349닷넷: 2205. C# - SuperSimpleTcp 사용 시 주의할 점파일 다운로드1
13531정성태1/16/20242244닷넷: 2204. C# - TCP KeepAlive에 새로 추가된 Retry 옵션파일 다운로드1
13530정성태1/15/20242197닷넷: 2203. C# - Python과의 AES 암호화 연동파일 다운로드1
13529정성태1/15/20242057닷넷: 2202. C# - PublishAot의 glibc에 대한 정적 링킹하는 방법
13528정성태1/14/20242182Linux: 68. busybox 컨테이너에서 실행 가능한 C++, Go 프로그램 빌드
13527정성태1/14/20242126오류 유형: 892. Visual Studio - Failed to launch debug adapter. Additional information may be available in the output window.
13526정성태1/14/20242209닷넷: 2201. C# - Facebook 연동 / 사용자 탈퇴 처리 방법
13525정성태1/13/20242161오류 유형: 891. Visual Studio - Web Application을 실행하지 못하는 IISExpress
13524정성태1/12/20242224오류 유형: 890. 한국투자증권 KIS Developers OpenAPI - GW라우팅 중 오류가 발생했습니다.
13523정성태1/12/20242032오류 유형: 889. Visual Studio - error : A project with that name is already opened in the solution.
13522정성태1/11/20242196닷넷: 2200. C# - HttpClient.PostAsJsonAsync 호출 시 "Transfer-Encoding: chunked" 대신 "Content-Length" 헤더 처리
13521정성태1/11/20242262닷넷: 2199. C# - 한국투자증권 KIS Developers OpenAPI의 WebSocket Ping, Pong 처리
13520정성태1/10/20242004오류 유형: 888. C# - Unable to resolve service for type 'Microsoft.Extensions.ObjectPool.ObjectPool`....'
13519정성태1/10/20242094닷넷: 2198. C# - Reflection을 이용한 ClientWebSocket의 Ping 호출파일 다운로드1
13518정성태1/9/20242361닷넷: 2197. C# - ClientWebSocket의 Ping, Pong 처리
13517정성태1/8/20242201스크립트: 63. Python - 공개 패키지를 이용한 위성 이미지 생성 (pystac_client, odc.stac)
13516정성태1/7/20242311닷넷: 2196. IIS - AppPool의 "Disable Overlapped Recycle" 옵션의 부작용
13515정성태1/6/20242588닷넷: 2195. async 메서드 내에서 C# 7의 discard 구문 활용 사례 [1]
13514정성태1/5/20242261개발 환경 구성: 702. IIS - AppPool의 "Disable Overlapped Recycle" 옵션
13513정성태1/5/20242185닷넷: 2194. C# - WebActivatorEx / System.Web의 PreApplicationStartMethod 특성
13512정성태1/4/20242152개발 환경 구성: 701. IIS - w3wp.exe 프로세스의 ASP.NET 런타임을 항상 Warmup 모드로 유지하는 preload Enabled 설정
13511정성태1/4/20242173닷넷: 2193. C# - ASP.NET Web Application + OpenAPI(Swashbuckle) 스펙 제공
13510정성태1/3/20242105닷넷: 2192. C# - 특정 실행 파일이 있는지 확인하는 방법 (Linux)
13509정성태1/3/20242144오류 유형: 887. .NET Core 2 이하의 프로젝트에서 System.Runtime.CompilerServices.Unsafe doesn't support netcoreapp2.0.
1  2  3  [4]  5  6  7  8  9  10  11  12  13  14  15  ...