kosmo138 / resumate

자기소개서를 세상에서 가장 쉽게 쓰는 방법
https://www.resumate.store
0 stars 0 forks source link

scipy 의존성 오류 #86

Closed suyons closed 3 months ago

suyons commented 3 months ago

연관 이슈

67

오류 1

gensim <- scipy <- numpy 이렇게 의존성이 구성되어 있다.

fatal error: asm/hwcap.h: No such file or directory

해결 1-1

원인: Alpine linux는 glibc 대신 musl libc를 사용하므로 glibc 헤더 파일이 없음 해결: Debian 기반의 python:3.12-slim 이미지로 변경하여 glibc를 이용

오류 2

ImportError: Error importing numpy: you should not try to import numpy from
        its source directory; please exit the numpy source tree, and relaunch
        your python interpreter from there.

해결 2-1

Google 검색 결과에서 찾은 설치하라는 패키지는 다음과 같이 모두 설치했으나 해결되지 않음.

apt update
apt install -y build-essential gfortran libblas-dev libopenblas-dev pkg-config

해결 2-2

scipy가 요구하는 numpy의 버전이 맞지 않다고 판단하여 python과 numpy의 버전을 다운그레이드

다운그레이드 버전은 다음과 같이 설정하였다.

Python: 3.11 Numpy: 1.23.2

근거: https://github.com/scipy/scipy/blob/v1.11.1/pyproject.toml#L43

pip uninstall numpy

Proceed (Y/n)? y
  Successfully uninstalled numpy-1.26.4
suyons commented 3 months ago

Close #86