새소식

카테고리 없음

pip install lanms 오류, ModuleNotFoundError: No module named 'lanms’

  • -
반응형

문제 상황 

lanms 패키지 사용을 위해 pip install을 했을 경우 오류가 발생하는 상황

Collecting lanms Using cached lanms-1.0.2.tar.gz (973 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [11 lines of output] make: Entering directory '/tmp/pip-install-spuut_ph/lanms_ade021f4b9ad4402add7ca02a908fd09' g++ -o lanms/adaptor.so -I include -std=c++11 -O3 -I/opt/conda/include/python3.10 -I/opt/conda/include/python3.10 -Wno-unused-result -Wsign-compare -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -ffunction-sections -pipe -isystem /opt/conda/include -fdebug-prefix-map=/croot/python-split_1694437906621/work=/usr/local/src/conda/python-3.10.13 -fdebug-prefix-map=/opt/conda=/usr/local/src/conda-prefix -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -flto -DNDEBUG -fwrapv -O3 -Wall -L/opt/conda/lib/python3.10/config-3.10-x86_64-linux-gnu -L/opt/conda/lib -lcrypt -lpthread -ldl -lutil -lm -lm adaptor.cpp include/clipper/clipper.cpp --shared -fPIC make: g++: Command not found make: *** [Makefile:10: lanms/adaptor.so] Error 127 make: Leaving directory '/tmp/pip-install-spuut_ph/lanms_ade021f4b9ad4402add7ca02a908fd09' Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "/tmp/pip-install-spuut_ph/lanms_ade021f4b9ad4402add7ca02a908fd09/setup.py", line 28, in <module> raise RuntimeError('Cannot compile lanms in the directory: {}'.format(BASE_DIR)) RuntimeError: Cannot compile lanms in the directory: /tmp/pip-install-spuut_ph/lanms_ade021f4b9ad4402add7ca02a908fd09 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

해결 방법

apt-get update

apt-get install g++

pip install lanms

g++을 설치 후 lanms 를 설치하면 해결된다.

반응형
Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.