unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Hartmut Goebel <h.goebel@crazy-compilers.com>
Cc: guix-devel@gnu.org, Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: Re: Anomalies in Python search-path
Date: Thu, 19 Jan 2017 12:48:57 +0100	[thread overview]
Message-ID: <87r33zz2vq.fsf@gnu.org> (raw)
In-Reply-To: <587C92D3.8090705@crazy-compilers.com> (Hartmut Goebel's message of "Mon, 16 Jan 2017 10:30:59 +0100")

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> Am 15.01.2017 um 23:10 schrieb Ludovic Courtès:
>>> > My last reporting that pip was working correctly in non-environment was
>>> > wrong because I had failed to logout/login after installing the python
>>> > package; after doing so, the behavior is the same as in an environment:
>>> > the user site location (~/.local/...) comes after site-packages rather
>>> > than before, as would normally be the case. Apparently this is due to
>>> > setting a site-packages location with the environment variable
>>> > PYTHONPATH, which has precedence over the user site location.
>> ~/.guix-profile/etc/profile prepends things to the search paths, but
>> it’s up to the user whether to source it before or after other
>> definitions have been provided (in .bash_profile or similar).
>
> Maxim is talking about how python is processing the paths.
>
> The "normal" order is:
> - $PYTHONPATH  (which normaly does not include site-packages)
> - Python Standard library (not including site-packages)
> - user's site-packages (~/.local/lib/python3.4/site-packages)
> - global site-packages (/usr/lib/python3.4/site-packages)
>
> The user's site-packages take precedence over the global ones.
>
> In Guix we currently use PYTHONPATH to add global site-packages. Since
> PYTHONPATH parts are put in front of the search list, they take
> precedence over the user's site-packages. And this behaviour is wrong.

Oh, I see.

I’m not sure what can be done on our side.  PYTHONPATH is the only thing
we can influence.

It looks like the notion of “global site-packages” only applies to FHS
systems and makes little sense for us.  If there were, say, a
PYTHONSITEPATH in lieu of this “global site-packages” thing, we could
use that.

Ludo’.

  reply	other threads:[~2017-01-19 11:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06 18:41 [PATCH] Update python-pip to 9.0.1 Maxim Cournoyer
2017-01-09 14:52 ` Ludovic Courtès
2017-01-12 16:44   ` Maxim Cournoyer
2017-01-14 17:43     ` Ludovic Courtès
2017-01-15 17:55       ` Anomalies in Python search-path (was: [PATCH] Update python-pip to 9.0.1) Maxim Cournoyer
2017-01-15 22:10         ` Anomalies in Python search-path Ludovic Courtès
2017-01-16  9:30           ` Hartmut Goebel
2017-01-19 11:48             ` Ludovic Courtès [this message]
2017-01-14 21:02 ` Anomalies in Python search-path (was: [PATCH] Update python-pip to 9.0.1) Hartmut Goebel
2017-01-15 19:23   ` Anomalies in Python search-path Maxim Cournoyer
2017-01-16  9:23     ` Hartmut Goebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r33zz2vq.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=h.goebel@crazy-compilers.com \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).