배경 : 도커와 Poetry를 결합해 컨테이너 구축(https://makenow90.tistory.com/3). 이후 request 모듈 설치후 컨테이너 쉘에서도 설치 됐는지 체크해봤는데, 설치가 안돼있음.
오류 해결과정
- 컨테이너 쉘에 접속후 잘 설치 됐는지 확인
$ docker exec -it airflow_airflow-webserver_1 /bin/bash
$ pip show python
WARNING: The directory '/home/airflow/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
WARNING: Package(s) not found: python
어쩐일인지 설치가 안됨 - pyproject.toml 파일에 제대로 설치된지 확인
-> 잘 설치 돼있다.
[tool.poetry]
name = "airflow"
version = "0.1.0"
description = ""
authors = ["bgh <makenow90@gmail.com>"]
[tool.poetry.dependencies]
python = "^3.8"
DateTime = "^5.5"
requests = "^2.32.3"
selenium = "^4.21.0"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api" - 검색해보니 poetry는 전용 shell이 있어 거기에 접속해야함
$ poetry shell
Spawning shell within /home/weare/.cache/pypoetry/virtualenvs/airflow-IEpSry0b-py3.10
(airflow-IEpSry0b-py3.10)
$ pip show requests
Name: requests
Version: 2.32.3
Summary: Python HTTP for Humans.
Home-page: https://requests.readthedocs.io
Author: Kenneth Reitz
Author-email: me@kennethreitz.org
License: Apache-2.0
Location: /home/weare/.cache/pypoetry/virtualenvs/airflow-IEpSry0b-py3.10/lib/python3.10/site-packages
Requires: certifi, charset-normalizer, idna, urllib3
Required-by:
(airflow-IEpSry0b-py3.10)
'오류 해결 과정' 카테고리의 다른 글
험난했던 원격 실행 도전기(PsExec,WinRMOperator) (0) | 2024.07.15 |
---|---|
가상 환경 활성화 후 스크립트 실행 시 오류 (0) | 2024.07.10 |
ChromeDriver 'DevToolsActivePort' 오류 해결: --no-sandbox 옵션의 중요성 (0) | 2024.07.07 |
win32com 모듈 ssh 미동작 에러 (0) | 2024.07.02 |
(python 설치 에러) A newer version of the Python launcher is already installed (1) | 2024.06.19 |