파이썬/오류모음4 [python] no module named 'mxnet' 오류 날때 해결 방법 저는 Kobert에서 pytorch_kobert.py 실행시킬때 발생했던 오류입니다. no module named 'mxnet' 시도 ① : pip install mxnet => 저는 안됐습니다.시도 ② : pip install git+https://git@github.com/SKTBrain/KoBERT.git@master=> 이것도 안됐습니다.해결방법 ③ : C:\Users\ubay\anaconda3\envs\dong\python.exe -m pip install pip==20.1.1=> pip 업데이트입니다. 필요 버전 확인해 보시고 시도해보시길 바랍니다. 해결되시길 바랍니다 :) 감사합니다 2024. 12. 11. [python] 패키지 절대 경로 설정 안녕하세요 :) 코드를 구현할 때, 가끔 경로가 다른데로 잡혀서 'no module named ~ '라는 문구가 나오는 오류가 발생합니다. 이럴 때 절대경로를 설정하여 해결 하는 방법입니다! import sysimport ossys.path.append(os.path.dirname('파일경로')) 감사합니다ㅎㅎ 2024. 7. 25. [파이썬 오류]The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. GDCM), pylibjpeg (req. ) DICOM 파일을 python으로 열거나 저장할때 오류났을때, 해결방법입니다. pip install pylibjpeg pylibjpeg-libjpeg pydicom 출처 : stackoverflow https://stackoverflow.com/questions/62159709/pydicom-read-file-is-only-working-with-some-dicom-images 2023. 3. 9. [파이썬 오류] Expected object of scalar type Long but got scalar type Int for argument #2 'target' in call to _thnn_nll_loss_forward loss = criterion(model_pred, label) 에서 loss 계산할 때 "Expected object of scalar type Long but got scalar type Int for argument #2 'target' in call to _thnn_nll_loss_forward" 오류가 뜸 해석 : 스칼라 유형의 개체가 Long이어야 하지만 _thnn_nll_loss_forward에 호출된 #2 'target' 인수에 대한 스칼라 유형 Int가 있습니다. label의 값을 쳐보니 "int32"로 나옴. 해결방법 : label.to(device) => label.to(device).long() 2022. 10. 10. 이전 1 다음