[Toaster] virtualenv for toaster and python 3

Christopher Larson clarson at kergoth.com
Wed Jun 1 10:24:52 PDT 2016


On Wed, Jun 1, 2016 at 2:27 AM, Ed Bartosh <ed.bartosh at linux.intel.com>
wrote:

> On Tue, May 31, 2016 at 11:48:01AM -0700, Christopher Larson wrote:
> > On Tue, May 31, 2016 at 11:47 AM, Brian Avery <avery.brian at gmail.com>
> wrote:
> >
> > > One possible solution is to use RP's suggestion to leverage the --user
> > > argument (which stores packges in
> > > $HOME/.local/lib/python3.4/site-packages.
> > >
> > > >pip3 install --user -r poky/bitbake/toaster-requirements.txt
> > > * works except wsgiref is not python3 compatible yet
> > > >pip3 list installed --local
> > > argparse (1.2.1)
> > > beautifulsoup4 (4.4.1)
> > > Django (1.8.13)
> > >
> > > * works to show what is a --user install vs a global site install.
> > > > pip3 uninstall/install --user --upgrade/.... works as expected...
> > >
> >
> > Cluttering up my ~/.local with app/project specific requirements is not
> > appropriate. As someone who uses --user quite a bit, I'd be quite annoyed
> > by this.
>
> So far pip3 --user looks like the only working approach to me. It's not
> ideal, but it's not that bad either. It should be used for its direct
> purpose
> - to install dependencies for 'one user' mode.
>
> For production Toaster instances I'd suggest to install runtime
> dependencies on the host system.
>
> BTW, Toaster has only one runtime requirement: Django. argparse and
> wsgiref is a legacy and beautifulsoup4 is not a runtime dependency. It's
> used only
> in tests.


--user is intended for use by the user,  not your scripts. I choose what I
put there for good reason. Your use case is what virtual environments are
for. If toaster can't handle that, it should be fixed to do so. From the
python documentation:

This scheme is designed to be the most convenient solution for users that
don’t have write permission to the global site-packages directory or don’t
want to install into it.

-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20160601/710962d4/attachment.html>


More information about the toaster mailing list