Microsoft MVP성태의 닷넷 이야기
개발 환경 구성: 388. Windows 환경에서 Octave 패키지 설치하는 방법 [링크 복사], [링크+제목 복사]
조회: 13885
글쓴 사람
정성태 (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

비밀번호

댓글 작성자
 




... 16  17  18  19  20  21  22  23  24  25  26  27  [28]  29  30  ...
NoWriterDateCnt.TitleFile(s)
12929정성태1/19/20226817개발 환경 구성: 630. AKS/k8s의 Pod에 Volume 연결하는 방법
12928정성태1/18/20226960개발 환경 구성: 629. AKS/Kubernetes에서 호스팅 중인 pod에 shell(/bin/bash)로 진입하는 방법
12927정성태1/18/20226733개발 환경 구성: 628. AKS 환경에 응용 프로그램 배포 방법
12926정성태1/17/20227214오류 유형: 787. AKS - pod 배포 시 ErrImagePull/ImagePullBackOff 오류
12925정성태1/17/20227317개발 환경 구성: 627. AKS의 준비 단계 - ACR(Azure Container Registry)에 docker 이미지 배포
12924정성태1/15/20228806.NET Framework: 1134. C# - ffmpeg(FFmpeg.AutoGen)를 이용한 비디오 디코딩 예제(decode_video.c) [2]파일 다운로드1
12923정성태1/15/20227726개발 환경 구성: 626. ffmpeg.exe를 사용해 비디오 파일을 MPEG1 포맷으로 변경하는 방법
12922정성태1/14/20226798개발 환경 구성: 625. AKS - Azure Kubernetes Service 생성 및 SLO/SLA 변경 방법
12921정성태1/14/20225771개발 환경 구성: 624. Docker Desktop에서 별도 서버에 설치한 docker registry에 이미지 올리는 방법
12920정성태1/14/20226526오류 유형: 786. Camtasia - An error occurred with the camera: Failed to Add Video Sampler.
12919정성태1/13/20226338Windows: 199. Host Network Service (HNS)에 의해서 점유되는 포트
12918정성태1/13/20226584Linux: 47. WSL - shell script에서 설정한 환경 변수가 스크립트 실행 후 반영되지 않는 문제
12917정성태1/12/20225790오류 유형: 785. C# - The type or namespace name '...' could not be found (are you missing a using directive or an assembly reference?)
12916정성태1/12/20225523오류 유형: 784. TFS - One or more source control bindings for this solution are not valid and are listed below.
12915정성태1/11/20225802오류 유형: 783. Visual Studio - We didn't find any interpreters
12914정성태1/11/20227754VS.NET IDE: 172. 비주얼 스튜디오 2022의 파이선 개발 환경 지원
12913정성태1/11/20228265.NET Framework: 1133. C# - byte * (바이트 포인터)를 FileStream으로 쓰는 방법 [1]
12912정성태1/11/20228901개발 환경 구성: 623. ffmpeg.exe를 사용해 비디오 파일의 이미지를 PGM(Portable Gray Map) 파일 포맷으로 출력하는 방법 [1]
12911정성태1/11/20226214VS.NET IDE: 171. 비주얼 스튜디오 - 더 이상 만들 수 없는 "ASP.NET Core 3.1 Web Application (.NET Framework)" 프로젝트
12910정성태1/10/20226694제니퍼 .NET: 30. 제니퍼 닷넷 적용 사례 (8) - CPU high와 DB 쿼리 성능에 문제가 함께 있는 사이트
12909정성태1/10/20228094오류 유형: 782. Visual Studio 2022 설치 시 "Couldn't install Microsoft.VisualCpp.Redist.14.Latest"
12908정성태1/10/20225943.NET Framework: 1132. C# - ref/out 매개변수의 IL 코드 처리
12907정성태1/9/20226402오류 유형: 781. (youtube-dl.exe) 실행 시 "This app can't run on your PC" / "Access is denied." 오류 발생
12906정성태1/9/20227023.NET Framework: 1131. C# - 네임스페이스까지 동일한 타입을 2개의 DLL에서 제공하는 경우 충돌을 우회하는 방법 [1]파일 다운로드1
12905정성태1/8/20226678오류 유형: 780. Could not load file or assembly 'Microsoft.VisualStudio.TextTemplating.VSHost.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
12904정성태1/8/20228697개발 환경 구성: 623. Visual Studio 2022 빌드 환경을 위한 github Actions 설정 [1]
... 16  17  18  19  20  21  22  23  24  25  26  27  [28]  29  30  ...