토니의 연습장
error: uninstall-no-record-file 본문
(rag) (rag) joseph@joseph:~/study/rag_ref/langchain-kr/16-Evaluations$ pip install --upgrade --force-reinstall --no-deps typing-extensions==4.12.2
Collecting typing-extensions==4.12.2
Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Installing collected packages: typing-extensions
Attempting uninstall: typing-extensions
Found existing installation: typing-extensions None
error: uninstall-no-record-file
× Cannot uninstall typing-extensions None
╰─> The package's contents are unknown: no RECORD file was found for typing-extensions.
hint: You might be able to recover from this via: pip install --force-reinstall --no-deps typing-extensions==4.12.2
현재 설치되어 있는 typing-extensions 패키지의 설치 기록(RECORD 파일)이 없어서 pip이 정상적으로 제거할 수 없다는 뜻이야. 이건 보통 다음과 같은 경우에 발생합니다.
- 수동으로 패키지를 설치하거나,
- 패키지가 손상되었거나,
- 시스템이나 다른 툴로 설치된 경우 (예: conda 환경에서 pip으로 설치했을 때)
이와 같은 경우 아래와 같이 --ignore-installed는 RECORD 파일 없이 설치된 경우에도 무시하고 새로 설치할 수 있게 도와줍니다.
(rag) (rag) joseph@joseph:~/study/rag_ref/langchain-kr/16-Evaluations$ pip install --ignore-installed --no-deps typing-extensions==4.12.2
Collecting typing-extensions==4.12.2
Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Installing collected packages: typing-extensions
Successfully installed typing-extensions-4.12.2
만약 위와 같이 설치해서 successfully installed 된 경우에도 동일 에러가 아래처럼 발생한다면
rag) (rag) joseph@joseph:~/study/rag_ref/langchain-kr/16-Evaluations$ pip install --force-reinstall --no-deps langsmith==0.1.147
Collecting langsmith==0.1.147
Using cached langsmith-0.1.147-py3-none-any.whl.metadata (14 kB)
Using cached langsmith-0.1.147-py3-none-any.whl (311 kB)
Installing collected packages: langsmith
Attempting uninstall: langsmith
Found existing installation: langsmith None
error: uninstall-no-record-file
× Cannot uninstall langsmith None
╰─> The package's contents are unknown: no RECORD file was found for langsmith.
hint: You might be able to recover from this via: pip install --force-reinstall --no-deps langsmith==0.1.147
수동으로 패키지 삭제 후 재설치:
만약 위 방법이 효과가 없으면, 파이썬 site-packages 디렉터리에서 langsmith 폴더를 직접 삭제 후 재설치해야 합니다.
python -c "import langsmith; print(langsmith.__file__)"
명령어를 통해 langsmith 폴더 위치를 확인한 후,
-> /home/joseph/miniconda3/envs/rag/lib/python3.11/site-packages/langsmith/__init.py__
해당 디렉터리로 이동한 후 아래 명령어로 langsmith 폴더를 삭제해 줍니다.
rm -rf langsmith
그 이후 다시 설치 명령어를 실행하는데,
langsmith 폴더가 없음에도 불구하고 기록상 설치되어 있다고 terminal log가 나오며 설치가 거부된다면,
다시 아래 ignore 명령어를 통해 설치하면 정상적으로 설치가 완료됩니다.
pip install --ignore-installed --no-deps langsmith==0.3.16
'기타 > 환경 & 라이브러리 (vscode, Conda, import)' 카테고리의 다른 글
langchain.chains 라이브러리 import (0) | 2025.04.07 |
---|---|
CLIP, taming-transformers 필요 패키지 버전 문제 (3) | 2024.11.01 |
Python Environments/Interpreter (1) | 2024.09.11 |
vscode ModuleNotFoundError (0) | 2024.09.04 |