def without_site_packages(path):
    return path.rsplit('/lib/', 2)[0]
The inverse operation of site_packages().
dataset/ETHPy150Open thisismedium/virtualenv-commands/vecmd/commands.py/without_site_packages