Hi
I would like to hear the answer to this question from someone who has a better understanding of the differences but here's what I feel about them. Please feel free to expand on this or correct me if I'm wrong.
주위 and 주변 are for the most part fairly synonymous. I feel though that 주위 is more like the English word "around". And 주변 means more like "surrounding". Because you can say 달은 지도 주위를 돈다 The moon orbits around the earth, but I don't think you can say 달은 지도 주변를 돈다. Again I could be wrong.
But you can use them interchangeably to talk about the space around you and then they are exactly the same.
주위에 사람들이 없어요.
주변에 사람들이 없어요.
Both meaning there are no people around.
근처(에) simply means in the area (of) or the vicinity (of). While interchangeable the meaning is somewhat different.
I hope this helps, and if someone has more to add I want to hear it because I find it a little confusing too. Thanks