I think the environment is important, but I strongly suspect that the responses you've gotten so far indicate that no one environment is best for everybody. Personally I find that I'm too easily distracted by training in a public gym, since I have to find an appropriate spot to do a given lift and it's not always the same spot. It's also very nice being able to do a lift, sit for 3-5 minutes before the next set and not feel like I'm hogging the equipment.
Probably the biggest issue with me is that I don't have an entirely predictable schedule. I lift 3-4 days/week, and always do the exercises in the same order, but sometimes I lift during the day on weekends and some times at night. I also may do back-to-back sessions of OHP/Deadlift on consecutive days, or I may skip a day between them. All of this makes it impractical to have a training partner without feeling like I'm constantly canceling at the last minute.
Finally, I'd love to be able to try out a hardcore gym with loud music and clouds of chalk dust, but I'm not sure I'd want to do that all the time.