개발/이슈 해결 모음

[Django, AWS] no module named 'uwsgi' 에러 해결기

Junhyung-Choi 2022. 8. 26. 02:02
반응형

분명 로컬에선 잘 돌아가는 걸 확인하고 (WSL) 이걸 가상환경이랑 통채로 깃헙에 올려버렸다.

 

 

GitHub - Junhyung-Choi/DRF_TEST

Contribute to Junhyung-Choi/DRF_TEST development by creating an account on GitHub.

github.com

이후 AWS 에서 runserver 까지 돌려봤는데 잘 돌길래 uwsgi 와 nginx를 통해 배포를 진행하려고 했는데 첫장부터 안되는거였다.

 

분명히 가상환경 안에서

pip3 install uwsgi 를 통해서 uwsgi를 설치했는데

계속해서 zsh에서 이걸 못잡는 거였다.

 

너무 이해가 안되서 여러 구글링을 해봤는데

https://stackoverflow.com/questions/64478218/why-couldnt-i-find-the-python-module-uwsgi-after-pip-install-uwsgi

 

why couldn't I find the python module uwsgi after pip install uwsgi?

After I have installed the uwsgi, I add the following code: import uwsgi But the IDE is warning that uwsgi module not exist. the command I used to install the uwsgi is: pip install uwsgi the inst...

stackoverflow.com

이대로 진행해봤는데 인스턴스 재부팅 해봤는데도 안되더라

 

https://askubuntu.com/questions/1156900/command-uwsgi-not-found

 

Command 'uwsgi' not found

I have installed "uwsgi" using pip method. But when I run uwsgi, I'm getting "Command 'uwsgi' not found, but can be installed with" error. If I again try to install using pip, I'm getting Collecting

askubuntu.com

이거대로 해봤는데 오히려 피봤다.

댓글에 달린 

https://stackoverflow.com/questions/23073829/uwsgi-wont-reload-restart-or-let-me-run-service

 

uWSGI won't reload, restart or let me run service

I have a fairly big issue. I am very new to uwsgi and am not 100% sure on how to debug this issue but I will give you information on where I am at. I have previously had sites working on this

stackoverflow.com

이 링크 가서 해결법을 봤는데 어떻게 되긴 하는데 내가 예전에 따라하던 튜토리얼이랑은 작동 방식이 달라지더라

sudo를 붙이면서 패키지 관리가 안되는 점도 불편했고

 

다만 바로 위의 링크를 읽어보면서 가상환경에 대한 문제일꺼라 생각하고, 가상환경을 지운 뒤

AWS 인스턴스 상에서 새로 가상환경을 만드니 sudo 없이도 잘 만들어지는걸 확인할 수 있었고, 정상작동하는걸 확인했다.

 

어려웠다 이 에러..

728x90