윈도우 Arm 파이썬 numpy 설치 (미해결)

IOVEIT·2023년 9월 19일
0
post-thumbnail

윈도우 Arm 파이썬에서는 pip로 설치되지 않는 라이브러리들이 있다. opencv, numpy가 대표적이다. 그 중 numpy는 설치되긴 한다. 어떻게? Visual Studio와 그에 딸린 라이브러리들을 함께 설치하면 뭔가 변화가 보인다.

그런데 "No Blas library detected!" 역시 뭐 쉽게 되는게 없다. BLAS는 Basic Linear Algebra Subprograms의 약자로서, 선형대수 연산을 수행하기 위한 루틴의 집합이다. 이제 어떻게 해야 하나? blas를 빼고 설치하면 된다. --config-settings=setup-args="-Dallow-noblas=true"

한 가지 문제는 "this may be up to 100x slower for some linear algebra operations"이 발생한다고 안내한다. 선형대수로 배열을 계산하지 못하니 노가다로 계산해야 해서 거의 100배 정도 느려진다는 의미로 보인다. 서피스(Arm cpu)에서 고성능을 기대하지 않으므로 일단 설치되어서 돌아가기만 하면 된다.

ERROR: Problem encountered: No BLAS library detected! Install one, or use the allow-noblas build option

 Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [46 lines of output]
      + C:\Dev\Lang\Python_3.11.5\python.exe 
      
      .
      .
      .
      
      C compiler for the host machine: cl (msvc 19.37.32824 "Microsoft (R) C/C++ 최적화 컴파일러 버전 19.37.32824(ARM64)")
      .
      .
      .
      
      Library m found: NO
      Did not find pkg-config by name 'pkg-config'
      Found Pkg-config: NO
      Found CMake: C:\Dev\Lang\VisualStudio2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.EXE (3.26.4)
      WARNING: CMake Toolchain: Failed to determine CMake compilers state
      Run-time dependency openblas found: NO (tried pkgconfig and cmake)
      Run-time dependency openblas found: NO (tried pkgconfig and cmake)

       ..\..\numpy\meson.build:207:4: 😀😀😀 ERROR: Problem encountered: No BLAS library detected! Install one, or use the `allow-noblas` build option (note, this may be up to 100x slower for some linear algebra operations).

다음 명령어로 설치해보자
python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"

2023.10.18 설치는 되었으나 이번에는 런타임에러가 발생함. 겨우 설치가 잘 된 것으로 알았더니 import 단계부터 에러가 나는구나. It went behind my back at the end. What am I supposed to do? LOL

File "c:\Dev\Code\Python\test.py", line 1, 
    in <module> import numpy

RuntimeError: NumPy was built with baseline optimizations:
(NEON NEON_FP16 NEON_VFPV4 ASIMD) but your machine doesn't support: (NEON)._

|참고|
https://github.com/numpy/numpy/issues/24703

profile
EnCoCookLand

0개의 댓글

관련 채용 정보