venv를 Windows에서 사용 불가/bin/python 구조/Scripts/python.exe 구조해결: Windows에서 python -m venv .venv로 새 환경 생성 후 패키지 재설치
단계별 코드 정리
python -m venv .venv
source .venv/Scripts/activate
pip install -r requirements.txt
# 확인용 코드
python
Python 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.executable)
C:\AI_prompt\second\Simple Chatbot\markov\.venv\Scripts\python.exe
# 이렇게 뜨면 확인 완료
uvloop does not support Windows at the moment 설치 에러
requirements.txt 에서 uvloop 제거
CreateProcess error=2, 지정된 파일을 찾을 수 없습니다 → PyCharm이 이전 가상환경 경로를 참조
해결: PyCharm 설정에서 기존 interpreter 삭제, 새로 생성한 가상환경 경로로 다시 등록