From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6LB2G5fFLmBkMAAA0tVLHw (envelope-from ) for ; Thu, 18 Feb 2021 19:52:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mPaqFpfFLmCSWgAAbx9fmQ (envelope-from ) for ; Thu, 18 Feb 2021 19:52:55 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 239F837164 for ; Thu, 18 Feb 2021 20:52:53 +0100 (CET) Received: from localhost ([::1]:51020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCpM3-0008WH-BE for larch@yhetil.org; Thu, 18 Feb 2021 14:52:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCpFS-0002np-Py for bug-guix@gnu.org; Thu, 18 Feb 2021 14:46:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:36471) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lCpFR-0002zy-TA for bug-guix@gnu.org; Thu, 18 Feb 2021 14:46:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lCpFR-0001Ka-QG for bug-guix@gnu.org; Thu, 18 Feb 2021 14:46:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#46569: python can't find internal pip modules in environment from manifest Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 18 Feb 2021 19:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46569 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Received: via spool by 46569-submit@debbugs.gnu.org id=B46569.16136775595107 (code B ref 46569); Thu, 18 Feb 2021 19:46:01 +0000 Received: (at 46569) by debbugs.gnu.org; 18 Feb 2021 19:45:59 +0000 Received: from localhost ([127.0.0.1]:48017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lCpFP-0001KJ-MP for submit@debbugs.gnu.org; Thu, 18 Feb 2021 14:45:59 -0500 Received: from mail1.fsfe.org ([217.69.89.151]:45796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lCpFO-0001KA-EQ for 46569@debbugs.gnu.org; Thu, 18 Feb 2021 14:45:59 -0500 From: Jelle Licht In-Reply-To: <87sg5tuu84.fsf@gmail.com> References: <86czwz7ms3.fsf@fsfe.org> <87sg5tuu84.fsf@gmail.com> Date: Thu, 18 Feb 2021 20:45:54 +0100 Message-ID: <86lfbl5fd9.fsf@fsfe.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 46569@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.27 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=fsfe.org (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 239F837164 X-Spam-Score: -2.27 X-Migadu-Scanner: scn1.migadu.com X-TUID: nPFO3AiZuZQA Maxim Cournoyer writes: > Hi Jelle, > > Jelle Licht writes: > >> Python can not load all pip-related python modules when loaded from a >> manifest file, yet seems to work fine when loaded 'directly' as part of >> a `guix environment'-invocation. >> >> >> Provided that we have a file in `hi.py': >> >> import pip >> print("halfwaypoint") >> import pip._internal.index.package_finder >> print("I made it!") >> >> >> and a `manifest.scm' with: >> >> (use-modules (gnu) (guix packages) >> (gnu packages python) >> (gnu packages python-xyz)) >> >> (packages->manifest (list python python-pip)) >> >> >> I can get the expected output by running: >> `guix environment --pure --ad-hoc python python-pip -- python3 hi.py' => >>> halfwaypoint >>> I made it! > > It seems that two pip versions don't cohabit very well. The same > happens if you install pip via 'pip install --user pip' (e.g., to > ~/.local/bin) and try to use it. > > You could try using the pip version that comes bundled with Python > itself (e.g, not installing python-pip in the same profile); if it's the > only one, it should work. It doesn't, though, with the exact same error message as above. Does my example (hi.py) work for you?