For a sociable person
there are allurements;
on the heels of allurement, this pain.
Seeing allurement's drawback,
wander alone
like a rhinoceros.
Free from longing, finding no pleasure
in the world's sport, love, or sensual bliss,
abstaining from adornment,
speaking the truth,
wander alone
like a rhinoceros.
If you gain a mature companion,
a fellow traveler, right-living & wise,
overcoming all dangers
go with them, gratified, mindful.
If you don't gain a mature companion,
a fellow traveler, right-living & wise,
wander alone
like a king renouncing his kingdom,
like the elephant in the Matanga wilds,
his herd.
We praise companionship—yes!
Those on a par, or better,
should be chosen as friends.
If they're not to be found,
living faultlessly,
wander alone
like a rhinoceros.
- Khaggavisana Sutta: A Rhinoceros
Note that the Buddha dos endorse companionship but it must be the right kind: "those on par or better" than yourself.