[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Avoiding PYTHONPATH - latest?

From: zimoun
Subject: Re: Avoiding PYTHONPATH - latest?
Date: Tue, 01 Dec 2020 13:39:39 +0100

On Mon, 30 Nov 2020 at 15:04, Phil <> wrote:

> I 100% agree it's a bad idea to mix packagers, but pip install's use-cases go
> beyond the need to do fixed installs of package@version, provided by
> Guix.

I am not sure to understand what you mean.  Installing always means
“fixed at package@version”.  I should miss something with your

> Given that Guix profile's can't be edited from within a Guix profile
> (for obvious reasons), if I want to edit my code whilst it is installed,
> I see the only way to do this is by having a virtual env on top of a
> Guix profile that contains only my own module - with the Guix profile
> holding Python and all the imports I depend on.

This is a bad practise and should not be encouraged.  All in all, you
end up with the big mess that Guix is trying to fix.

For example, I am using Emacs and before I was using ’use-package’ which
allows to locally tweak the packages that I depend on.  Then, I wanted
to do the same with Guix.  At the end, it is wrong.  The right thing is
inspect the package and if you need to fix, do “guix build -S <pkg>”,
fix and create a variant using package transformation, for instance.
This way, you have something reproducible, easy to share and/or deploy.

> Perhaps the simple answer here is never mix pip and guix, and setup your
> development environment so there is never a requirement on pip.  But this is
> a limitation to people used to working this way.

My point of view is use pip or Guix, not both.  I was using Conda to
manage my Python stuff.  And same, I wanted to reproduce my Conda habits
with Guix.

Yeah, Guix changes the working habits, and as any changing habits, we
often do not like at first.  But, somehow it is only an habit.  And as
sugar in coffee, you need 3 weeks of complaints and then you will even
forget the taste of sugar. ;-)

> If nothing else, personally, it was a good off-the-deep-end way to get under 
> the
> covers of Guix's treatment of python and python packages :-)

We discussed at the recent Guix Days that documentation “Getting
starting with X” is lacking–where X is Python, R, C, Haskell, etc.

Feel free to send a Cookbook recipe [1] about your Python setup. :-)

1: <>

All the best,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]