As far as I know, distutils.sysconfig.get_python_lib() is the standard way
of doing it (and that's what tools use).


Thanks,
-- Ionel Cristian Mărieș, http://blog.ionelmc.ro

On Tue, Apr 7, 2015 at 5:14 PM, Randy Syring <[email protected]> wrote:

>  If I'm running a python script in a virtualenv, what is the best method
> for calculating the path of that virtualenv's site-packages directory?
>
> I'm only running this command for development environments and as a
> shortcut for developers, so something that works most of the time is fine.
> This code isn't going to end up in a production system anywhere.
>
> *Randy Syring*
> Husband | Father | Redeemed Sinner
>
>
> *"For what does it profit a man to gain the whole world and forfeit his
> soul?" (Mark 8:36 ESV)*
>
>
> _______________________________________________
> Distutils-SIG maillist  -  [email protected]
> https://mail.python.org/mailman/listinfo/distutils-sig
>
>
_______________________________________________
Distutils-SIG maillist  -  [email protected]
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to