This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Marcus.Smith, Saimadhav.Heblikar, belopolsky, dstufft, erickhoo, markroseman, ncoghlan, paul.moore, peter.otten, rhettinger, terry.reedy, upendra-k14
Date 2016-06-26.03:28:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1466911728.65.0.995578799649.issue23551@psf.upfronthosting.co.za>
In-reply-to
Content
Virtual environments don't provide any sandboxing, they just let you isolate different dependency sets from each other when switching between working on different applications.

If you're inside a venv, you'll see either:

    sys.prefix != sys.base_prefix (venv created by Py3 stdlib)

or:

    hasattr(sys, "real_prefix") (venv created by virtualenv)

In this case, you can assume the user has write permissions to the virtual environment and just invoke sys.executable with "-m pip install pipgui" as arguments.

If you're *not* in a virtual environment, you're running directly in the system Python, and the user may not have permission to install new packages for everyone (and even if they do, it's not necessarily a good idea). In that case, you want to pass "-m pip install --user pipgui", so the GUI components get installed in the user's home directory, rather than system wide.
History
Date User Action Args
2016-06-26 03:28:48ncoghlansetrecipients: + ncoghlan, rhettinger, terry.reedy, paul.moore, peter.otten, belopolsky, markroseman, dstufft, Marcus.Smith, Saimadhav.Heblikar, upendra-k14, erickhoo
2016-06-26 03:28:48ncoghlansetmessageid: <1466911728.65.0.995578799649.issue23551@psf.upfronthosting.co.za>
2016-06-26 03:28:48ncoghlanlinkissue23551 messages
2016-06-26 03:28:47ncoghlancreate