On Wed, Mar 11, 2020 at 10:55 AM Grant Edwards <[email protected]>
wrote:
> Background: a utility written in Python that I use regularly
> (weasyprint) was out-of-date and is being dropped from Gentoo's
> package database. I tried (and faield) to creaate an ebuild for a
> more recent version. So I ended up doing
>
> $ pip3 install --user weasyprint
>
> That installed weasyprint and a few depdendancies (tinycss2,
> defusedxml, ciarocffi) under ~/.local/{bin,lib64}.
>
> Question:
>
> Can those dependancies installed under ~/.local cause problems for
> things that were installed using standard ebuilds which require
> older/other versions of those libraries (which were installed using
> standard ebuilds)?
>
> For example, weasyprint requires cairosvg 2.4, and 2.4.2 was installed
> under .local via the pip3 command shown above.
>
> My stable cairosvg is 2.0.3 and it is installed in the usual "system"
> location /usr/lib64/python3.6/site-packages by the normal "emerge"
> process. [IIRC, at one point I tried unmasking 2.4.2, but that caused
> a cascade of other problems.]
>
> Q: Under what conditions will having a second installation of a Python
> library under .local cause problems?
>
I cannot really answer your questions about multiple python versions as
you've outlined it. However I've used virtualenv (and others) for this sort
of thing where I want a specific program to run with a specific version of
python. It's easy to use and keeps everything isolated very well. The
downside of it is that you have to enter/exit the environment to use the
program but I've had 5 or 6 versions of python installed at one time and it
works fine for what it does.
HTH,
Mark