Hi! ludo@gnu.org (Ludovic Courtès) writes: > Hello! > > Maxim Cournoyer skribis: > >> ludo@gnu.org (Ludovic Courtès) writes: > > [...] > >>> ‘guix environment’ without --pure adds its own entries to the front of >>> the search paths, which is why we observe this behavior. >>> After more testing, the Python search-path we form is always problematic for pip since the system site-packages will always appear in front of the user site location (~/.local/...). 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. All of these precedence rules ared defined by the module site.py which comes with Python. It can print information about the Python search paths with: $ python -m site Normally the user site-packages location should come before any other site-packages location so that user installed Python packages can take precedence over packages visible at the system level (or in our profile in the the case Guix). >> >> Is this specific to 'guix environment' with --pure vs without --pure? > > Without ‘--pure’. Conversely, ‘--pure’ clears the environment > variables altogether: > > https://www.gnu.org/software/guix/manual/html_node/Invoking-guix-environment.html > >> Also, would this behavior be observed for any 3rd >> party package management system, say, the one for ruby, or >> language? If so maybe we could document this behavior somewhere. > > What would you add to the document of ‘guix environment’? It seems > quite clear to me at first sight. > I've re-read the documentation about it and yes, it is quite clear about what it does. I'll revisit any problems with environments later, after the root problem (which lies in the way we manage the Python search paths in our Python package definition/python build system) is fixed. Thanks for you time, and for Guix! Maxim