Microsoft MVP성태의 닷넷 이야기
개발 환경 구성: 388. Windows 환경에서 Octave 패키지 설치하는 방법 [링크 복사], [링크+제목 복사]
조회: 13845
글쓴 사람
정성태 (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)
13606정성태4/24/202489닷넷: 2247. C# - tensorflow 연동 (MNIST 예제)파일 다운로드1
13605정성태4/23/2024327닷넷: 2246. C# - Python.NET을 이용한 파이썬 소스코드 연동파일 다운로드1
13604정성태4/22/2024342오류 유형: 901. Visual Studio - Unable to set the next statement. Set next statement cannot be used in '[Exception]' call stack frames.
13603정성태4/21/2024583닷넷: 2245. C# - IronPython을 이용한 파이썬 소스코드 연동파일 다운로드1
13602정성태4/20/2024796닷넷: 2244. C# - PCM 오디오 데이터를 연속(Streaming) 재생 (Windows Multimedia)파일 다운로드1
13601정성태4/19/2024838닷넷: 2243. C# - PCM 사운드 재생(NAudio)파일 다운로드1
13600정성태4/18/2024847닷넷: 2242. C# - 관리 스레드와 비관리 스레드
13599정성태4/17/2024862닷넷: 2241. C# - WAV 파일의 PCM 사운드 재생(Windows Multimedia)파일 다운로드1
13598정성태4/16/2024884닷넷: 2240. C# - WAV 파일 포맷 + LIST 헤더파일 다운로드2
13597정성태4/15/2024866닷넷: 2239. C# - WAV 파일의 PCM 데이터 생성 및 출력파일 다운로드1
13596정성태4/14/20241052닷넷: 2238. C# - WAV 기본 파일 포맷파일 다운로드1
13595정성태4/13/20241050닷넷: 2237. C# - Audio 장치 열기 (Windows Multimedia, NAudio)파일 다운로드1
13594정성태4/12/20241068닷넷: 2236. C# - Audio 장치 열람 (Windows Multimedia, NAudio)파일 다운로드1
13593정성태4/8/20241079닷넷: 2235. MSBuild - AccelerateBuildsInVisualStudio 옵션
13592정성태4/2/20241218C/C++: 165. CLion으로 만든 Rust Win32 DLL을 C#과 연동
13591정성태4/2/20241194닷넷: 2234. C# - WPF 응용 프로그램에 Blazor App 통합파일 다운로드1
13590정성태3/31/20241078Linux: 70. Python - uwsgi 응용 프로그램이 k8s 환경에서 OOM 발생하는 문제
13589정성태3/29/20241150닷넷: 2233. C# - 프로세스 CPU 사용량을 나타내는 성능 카운터와 Win32 API파일 다운로드1
13588정성태3/28/20241263닷넷: 2232. C# - Unity + 닷넷 App(WinForms/WPF) 간의 Named Pipe 통신 [2]파일 다운로드1
13587정성태3/27/20241168오류 유형: 900. Windows Update 오류 - 8024402C, 80070643
13586정성태3/27/20241329Windows: 263. Windows - 복구 파티션(Recovery Partition) 용량을 늘리는 방법
13585정성태3/26/20241112Windows: 262. PerformanceCounter의 InstanceName에 pid를 추가한 "Process V2"
13584정성태3/26/20241062개발 환경 구성: 708. Unity3D - C# Windows Forms / WPF Application에 통합하는 방법파일 다운로드1
13583정성태3/25/20241299Windows: 261. CPU Utilization이 100% 넘는 경우를 성능 카운터로 확인하는 방법
13582정성태3/19/20241557Windows: 260. CPU 사용률을 나타내는 2가지 수치 - 사용량(Usage)과 활용률(Utilization)파일 다운로드1
[1]  2  3  4  5  6  7  8  9  10  11  12  13  14  15  ...