[Distutils] Method for calculating virtualenv site-packages directory

Ionel Cristian Mărieș contact at ionelmc.ro
Tue Apr 7 16:18:21 CEST 2015


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 <randy at thesyrings.us> 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  -  Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20150407/4c2dc29b/attachment.html>


More information about the Distutils-SIG mailing list