공부 정리 블로그

1126_label studio 본문

proyector en Chile

1126_label studio

따옹 2024. 11. 27. 04:19

python 최신 버젼인

python 3.13.0 - Oct. 7, 2024를 다운 받아서 label studio를 열려고 시도했으나, 되지 않았다.

Collecting numpy<2.0.0,>=1.26.4 (from label-studio) Using cached numpy-1.26.4.tar.gz (15.8 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [21 lines of output] + C:\Users\choi.dayoung\AppData\Local\Programs\Python\Python313\python.exe C:\Users\choi.dayoung\AppData\Local\Temp\pip-install-lyr6znqp\numpy_3332039a65d04219aa30092565ba5185\vendored-meson\meson\meson.py setup C:\Users\choi.dayoung\AppData\Local\Temp\pip-install-lyr6znqp\numpy_3332039a65d04219aa30092565ba5185 C:\Users\choi.dayoung\AppData\Local\Temp\pip-install-lyr6znqp\numpy_3332039a65d04219aa30092565ba5185\.mesonpy-jglotyz_ -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\choi.dayoung\AppData\Local\Temp\pip-install-lyr6znqp\numpy_3332039a65d04219aa30092565ba5185\.mesonpy-jglotyz_\meson-python-native-file.ini The Meson build system Version: 1.2.99 Source dir: C:\Users\choi.dayoung\AppData\Local\Temp\pip-install-lyr6znqp\numpy_3332039a65d04219aa30092565ba5185 Build dir: C:\Users\choi.dayoung\AppData\Local\Temp\pip-install-lyr6znqp\numpy_3332039a65d04219aa30092565ba5185\.mesonpy-jglotyz_ Build type: native build Project name: NumPy Project version: 1.26.4 WARNING: Failed to activate VS environment: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe ..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']] The following exception(s) were encountered: Running icl "" gave "[WinError 2] The system cannot find the file specified" Running cl /? gave "[WinError 2] The system cannot find the file specified" Running cc --version gave "[WinError 2] The system cannot find the file specified" Running gcc --version gave "[WinError 2] The system cannot find the file specified" Running clang --version gave "[WinError 2] The system cannot find the file specified" Running clang-cl /? gave "[WinError 2] The system cannot find the file specified" Running pgcc --version gave "[WinError 2] The system cannot find the file specified" A full log can be found at C:\Users\choi.dayoung\AppData\Local\Temp\pip-install-lyr6znqp\numpy_3332039a65d04219aa30092565ba5185\.mesonpy-jglotyz_\meson-logs\meson-log.txt [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip.

이런 에러가 떠서 Docker라는 것으로도 시도하려 했으나, cmd 창에서 불러지지 않았다.

관리자 권한으로 실행해보고 싶었으나, 시스템 암호를 요구했다.

 

마리오에게 시스템 암호를 줄 수 있냐고 물었더니 본인 개인 아이디라 힘들다고 답변 했다.

그렇기 때문에 다른 방법을 찾아보고자 GPT 한테 물어본 결과, 

 

위 에러는 numpy를 설치하는 과정에서 발생한 문제로, 주요 원인은 다음과 같습니다:


1. 컴파일러 부족 문제

  • 에러 메시지에서 Unknown compiler(s) 라는 부분을 보면, 설치 과정에서 필요한 C/C++ 컴파일러가 없거나 제대로 설정되지 않았음을 나타냅니다.
  • 특히, Visual Studio Build Tools나 Microsoft Visual C++ Build Tools 같은 필수 도구가 설치되어 있지 않을 가능성이 큽니다.
  • vswhere.exe가 없다는 메시지도 이를 암시합니다.

2. Python 버전 문제

  • 설치된 Python이 numpy와 호환되지 않을 가능성도 있습니다. Python 3.13은 매우 최신 버전으로, 일부 라이브러리가 아직 지원하지 않을 수 있습니다.
  • 설치하려는 numpy 버전이 현재 Python 버전과 호환되지 않거나, 빌드 도구와 충돌할 수 있습니다.

3. 빌드 도구 설정 문제

  • numpy와 같은 라이브러리는 종종 C/C++ 코드로 작성된 부분이 포함되어 있어, 설치 시 로컬에서 이를 컴파일해야 합니다.
  • meson과 같은 빌드 시스템이 제대로 설정되지 않아서 문제가 발생한 것으로 보입니다.

해결 방법

다음 단계를 따라 문제를 해결할 수 있습니다:

1. Microsoft C++ Build Tools 설치


2. Python 버전 확인 및 다운그레이드

  • 현재 사용하는 Python 버전 (Python 3.13)이 문제를 일으킬 수 있으므로 안정적인 버전 (Python 3.10 또는 3.11)로 다운그레이드하세요.
  • 새 버전을 설치한 후, Python 경로를 다시 설정하세요.

3. 미리 빌드된 numpy 설치

  • numpy는 컴파일하지 않고도 설치 가능한 미리 빌드된 바이너리가 있습니다.
  • 다음 명령어로 시도해보세요:
    pip install numpy --only-binary=:all:
    

4. label-studio와의 의존성 확인

  • label-studio가 특정 버전의 numpy를 요구하기 때문에 최신 버전이 아니라면 버전을 명시하여 설치하세요:
    pip install numpy==1.26.0
    

5. meson 빌드 도구 문제 해결

  • meson이 제대로 동작하지 않는 경우, meson과 ninja를 명시적으로 설치하세요:
    pip install meson ninja
    

6. 로깅 확인

  • C:\Users\choi.dayoung\AppData\Local\Temp\pip-install-lyr6znqp\numpy_3332039a65d04219aa30092565ba5185\.mesonpy-jglotyz_\meson-logs\meson-log.txt 파일을 열어 자세한 빌드 실패 이유를 확인할 수 있습니다.

위 단계를 따라도 문제가 계속된다면, 관련 설정 상태를 확인하거나 추가 로그를 공유해 주시면 더 구체적인 해결책을 드릴 수 있습니다. 😊


일단 저기서 가장 쉬워보이는 python 다운그레이드를 시도해봤다.

 

. 현재 설치된 Python 제거

Windows:

  1. 제어판 열기
    • 제어판 > 프로그램 > 프로그램 및 기능으로 이동합니다.
  2. Python 삭제
    • 현재 설치된 Python을 선택하고 제거 버튼을 클릭하세요.

2. 특정 버전의 Python 다운로드

  1. 공식 웹사이트 방문
    Python 공식 다운로드 페이지로 이동합니다.
  2. 원하는 버전 선택
    • 페이지 하단의 "Looking for a specific release?" 섹션에서 원하는 버전 (예: 3.10.12)을 선택합니다.
    •  

나는 python 3.10.12  버전을 찾을 수 없어서 python 3.10.11 버전으로 새로 깔았다.

 

4. Python 버전 확인

설치 후 터미널에서 Python 버전을 확인하세요:

bash
Copy code
python --version

또는:

bash
Copy code
python3 --version
 
이렇게 확인하려고 했으나
 

3. Python 실행 확인

Python 설치 여부를 확실히 확인하려면 Python 인터프리터를 실행해 볼 수도 있습니다:

shell
Copy code
python

또는:

shell
Copy code
python3

출력 예:

plaintext
Copy code
Python 3.10.12 (tags/v3.10.12:123456, Oct 15 2024, 08:33:30) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>>

>>>가 표시되면 Python이 정상적으로 설치된 상태입니다.

 

>>> 가 표시되지 않아서 cmd 창을 닫고 다시 실행, 그 이후 label studio  설치 재시도


라벨 스튜디오는 파이썬 pip, conda, docker 등 다양한 설치 방법을 지원하며, 설치할 때 당연하지만 파이썬이 필요하다. 본 글에서는 pip로 설치하는 방법을 설명하도록 하겠다.

pip 설치

pip install label-studioCopy

실행

label-studio

 

출처 https://starlane.tistory.com/9

 

[Label Studio] 라벨 스튜디오 사용해보기

Label Studio란? Label Studio는 파이썬 기반 오픈소스 데이터 라벨링 툴로 오디오, 텍스트, 이미지, 비디오 등 다양한 유형의 데이터에 라벨링을 수행할 수 있는 프로그램이다. 또한, 웹기반으로 되어

starlane.tistory.com



성공 !!