Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
Tags
- 오블완
- IRP
- 퇴직연금
- JEPQ
- SCHD
- 직투
- isa
- 주식
- 강환국
- ace 미국30년국채액티브(h)
- 매일매수
- 앱테크
- 삼성전자우
- ETF
- 국장
- chatGPT
- 티스토리챌린지
- 토스
- N잡
- OXY
- Python
- S&P500
- rise 200고배당커버드콜atm
- 자동매매
- 삼성전자
- 업비트
- 연금
- 미국주식
- 개인연금
- 재테크
Archives
- Today
- Total
재테크 A2Z
Poetry 설치 후 GitHub 연동 시 발생한 에러와 해결 방법 (Windows 기준) 본문
Python 프로젝트에서 Poetry를 활용해 패키지를 관리하고 GitHub와 연동하는 과정에서 실제 발생한 문제들을 해결한 기록입니다.
📌 환경 구성
- 운영체제: Windows 10 / 11
- Python: 3.10 (※ Microsoft Store 설치 ❌, 공식 설치)
- Poetry: 2.1.3
- Git: Git for Windows
- 에디터: Visual Studio Code
✅ Poetry 설치
powershell
복사편집
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
Poetry 명령어가 안 먹힌다면?
powershell
복사편집
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$env:APPDATA\Python\Scripts", "User")
설치 확인:
bash
복사편집
poetry --version
🚨 오류 1: poetry new 실행 시 Python 경로 문제
lua
복사편집
Command '[...\\python.exe'] returned non-zero exit status 9009.
🔍 원인: Poetry가 Microsoft Store에 있는 가짜 python.exe를 참조
✅ 해결: Python 3.10.11을 공식 사이트에서 설치한 뒤, Poetry에 명시적으로 연결
bash
복사편집
poetry env use C:\Users\사용자명\AppData\Local\Programs\Python\Python310\python.exe
🚨 오류 2: poetry shell 안됨
csharp
복사편집
The 'shell' command is not installed by default...
✅ 해결 방법 1 (가상환경 수동 진입):
powershell
복사편집
poetry env info --path # 출력 경로 예시 # C:\Users\you\AppData\Local\pypoetry\Cache\virtualenvs\autobot-trader-xxxx\Scripts\Activate.ps1 & "해당경로\Activate.ps1"
✅ 해결 방법 2 (plugin 설치):
bash
복사편집
poetry self add poetry-plugin-shell poetry shell
🚨 오류 3: Git 명령 인식 안 됨
bash
복사편집
'git'은(는) 인식되지 않는 명령입니다
✅ 해결: Git for Windows 설치 후 git --version 확인
🚨 오류 4: GitHub 푸시 시 'Could not resolve host'
✅ 해결:
- 인터넷 연결 / 방화벽 확인
- git remote -v 확인 → 주소 틀렸으면:
🚨 오류 5: GitHub 인증 실패 (Username, Password)
makefile
복사편집
remote: Support for password authentication was removed...
✅ 해결: GitHub Personal Access Token (PAT) 사용
- GitHub Token 발급 페이지 접속
- "Generate new token (classic)"
- 권한 체크: repo, read:org
- 생성된 토큰을 비밀번호 자리에 붙여넣기
🚨 오류 6: 인증창 127.0.0.1 ERR_CONNECTION_REFUSED
✅ 해결:
- PowerShell 재실행 후 git push 재시도
- 브라우저 인증 실패 시 → PAT 방식으로 전환
✅ 마무리: GitHub 푸시까지 성공한 상태
bash
복사편집
git init git remote add origin https://github.com/사용자명/저장소명.git git add . git commit -m "🎉 Initial commit" git push -u origin main
📁 최종 프로젝트 구조 예시
autobot-trader/
├── .gitignore
├── README.md
├── pyproject.toml
├── poetry.lock
├── src/
│ └── autobot_trader/
│ ├── __init__.py
│ └── main.py
└── tests/
└── __init__.py
├── .gitignore
├── README.md
├── pyproject.toml
├── poetry.lock
├── src/
│ └── autobot_trader/
│ ├── __init__.py
│ └── main.py
└── tests/
└── __init__.py
Poetry + GitHub 연동의 핵심은:
- 올바른 Python 경로 지정
- Git 인증 방식(PAT) 이해
- PowerShell과 환경 변수 설정
'코딩 & 파이썬' 카테고리의 다른 글
| 자동매매서버구축 X200 vs. N100 (0) | 2025.05.20 |
|---|---|
| 2025.05.19 VS Code 가상환경 연동 ~ 전략모듈 실행테스트 (0) | 2025.05.19 |
| 2025.05.19 Poetry로 Python 프로젝트 설정하는 방법 (윈도우 기준) (0) | 2025.05.19 |
| 2025.05.19 GitHub 초기 커밋 구조 만들기 (0) | 2025.05.19 |
| 2025.05.18 개발환경 통일가이드 (0) | 2025.05.18 |