From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id sJO2KECmlmWWHAAAkFu2QA (envelope-from ) for ; Thu, 04 Jan 2024 13:36:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id SNw3IUCmlmULMQEA62LTzQ (envelope-from ) for ; Thu, 04 Jan 2024 13:36:16 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fastmail.net header.s=fm2 header.b=KcMl1l5z; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=cThG2cjZ; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fastmail.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704371776; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=PIDcuCQM5Lmp+MWIEUUdnsG5eaRrKy33WnSyIFUu/MQ=; b=GYFrzIJYvhVCkB+/vvCdTjS9hkS4uFiEBil1Z//WAeXKuu0FwEXp8qJJurkcE+WlLGoedh pPI4G9CtZugqNgw+jdewNgMFXvnY4hNUo2EGfmbBt2bipUUIY4OZkAQwUQ1BXqQH5bAO9U /xkjQJtHxPSxuAgiv8sXqrDDN5B9TZa9qwnZAxhfx+5bHCpV9lv9mZ7K66sblO8DVN5cMb 2QRGdat4tCYEoLOUx4Cnrfmx02w9jPT0GfQ+mYv08TX1neE8x+2VYooROfgzoROVZ1lcsC BHnc2bGd6z60uqSHGFq30U+/cuQG+lK3ZaawewDCdh2+9U3ivCQ1YPGAz6gSVA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704371776; a=rsa-sha256; cv=none; b=CfnLCblWK0PRHMDokgs0hUEOZWOcHt/JpLJNhm3BCpVCq7bwnMPF2tOO9QCJTyrnXa1eKs nujL53YnzWANq5UtnT00H72ImloVEcWmsEfQAJSXQ24G8qxo2vtCuFMN82zyQ3l/NVuIgL /xlOfogW/R1/0uVzeTopnNL3r2e8UkbAmon9dI6e4uajNRAcn9ANQOCR+5I6c71nK/+vjN xyV+s5K5sANytESTX604piB2f0ex+6SLkPtSTqP2UN1oj1NH1emzLWppbDUrmUsTyDmLZF e2pPQC6n8jL8KFlIfTr1Y8nq9XQJdEKu5Uen9jVxKtBz1FMmMcbACUukAeadHw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fastmail.net header.s=fm2 header.b=KcMl1l5z; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=cThG2cjZ; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fastmail.net (policy=none) 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 43ECD317F1 for ; Thu, 4 Jan 2024 13:36:15 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLMx8-0001cu-0I; Thu, 04 Jan 2024 07:36:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLMx5-0001cb-5I for bug-guix@gnu.org; Thu, 04 Jan 2024 07:35:59 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLMx4-0007G3-Ss for bug-guix@gnu.org; Thu, 04 Jan 2024 07:35:58 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rLMx8-0004jP-GK for bug-guix@gnu.org; Thu, 04 Jan 2024 07:36:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#53258: Python unable to find modules within a Singularity container created with guix pack References: <67e7d225-f824-b691-7125-6b37abef8bb0@felsoci.sk> In-Reply-To: <67e7d225-f824-b691-7125-6b37abef8bb0@felsoci.sk> Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 04 Jan 2024 12:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53258 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 53258@debbugs.gnu.org Received: via spool by 53258-submit@debbugs.gnu.org id=B53258.170437174518158 (code B ref 53258); Thu, 04 Jan 2024 12:36:02 +0000 Received: (at 53258) by debbugs.gnu.org; 4 Jan 2024 12:35:45 +0000 Received: from localhost ([127.0.0.1]:53828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLMwr-0004io-5v for submit@debbugs.gnu.org; Thu, 04 Jan 2024 07:35:45 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:37289) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLMwo-0004iY-5h for 53258@debbugs.gnu.org; Thu, 04 Jan 2024 07:35:44 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 34F745C01DD; Thu, 4 Jan 2024 07:35:32 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 04 Jan 2024 07:35:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm2; t=1704371732; x=1704458132; bh=PIDcuCQM5Lmp+MWIEUUdnsG5eaRrKy33 WnSyIFUu/MQ=; b=KcMl1l5z8NTJl/NLMu003bp+uMFoiDkdlGqMSmwqqSULys6W mNlxtQh5HhyMYMqgEUKN7qse3pO0iYL2ULlBPz52xgIvvaw3WWCFjSLlIUvIZsCT DZILH4zQ6h5zoSYPZhp4WGRyo+IzoBfQjyXDa98demrHTmYB3/36ZRR6RL1wyspj nHqOr9pBDCsM9f7o3QiEhHtIWzKeM/HDFguIQodVZ/nlbgSmUqbYU/ZwPpaWdWbk vrjy6eWe+zuRlgUfBnQMoP6oe49rpkcUUCqarw7QciJoiPTlE+e7XaMVftXOtjJL leUTLZbILmMP4FotAdvHZdHuVoALv9pPnLvORg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1704371732; x=1704458132; bh=PIDcuCQM5Lmp+MWIEUUdnsG5eaRrKy33WnS yIFUu/MQ=; b=cThG2cjZ/M6c5n32Gkfxl9DwvpDAA1A9tIC+Y++uOyKu8kOEP6E Eg8HNO8TB1u9QTrNpvKIGMU7RrYEW9vVCB61/A7crNHt6TggKYe6iQqyeS1sCHF7 s0ExKcZ1GW8iQk2DANoXYDxtqYyrzuY8/5p0pSSPosqDHWTF0qvKNVwD+jpr8VrV MTnXiThddEBCRU+rlhJqHUS0OZdEIn1isc2Nfr3XXn1GF6GBA5kztaigfxsfiI2l 9ouU5DtAfAp47VZ0PbMalg9SxscWeOGKQcrZUndLOKajqdeAMwWTfMqLYZkOULqD 1I2sIOUoRpe05aKFrnytIamjE+xc90wWwzg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdegjedggeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtsehttdertddttd dtnecuhfhrohhmpefmohhnrhgrugcujfhinhhsvghnuceokhhonhhrrggurdhhihhnshgv nhesfhgrshhtmhgrihhlrdhnvghtqeenucggtffrrghtthgvrhhnpeevfeevuedtiedtte etgfeghedvudeileekgfehkeehudetveehgeeuteeuveejheenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehkohhnrhgrugdrhhhinhhsvghnse hfrghsthhmrghilhdrnhgvth X-ME-Proxy: Feedback-ID: i184641e2:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Jan 2024 07:35:31 -0500 (EST) From: Konrad Hinsen Date: Thu, 04 Jan 2024 13:35:28 +0100 Message-ID: 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: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.29 X-Spam-Score: -5.29 X-Migadu-Queue-Id: 43ECD317F1 X-Migadu-Scanner: mx12.migadu.com X-TUID: ONTSaWK5l9T4 Hi everyone, I found this issue while investigating a related one (the error message). It looks like the core problem discussed here has been solved in the meantime: Singularity> python3 -m numpy Error in sitecustomize; set PYTHONVERBOSE for traceback: ValueError: '/gnu/store/kx98dz2vc3gdpjficy4nbd7rscnkvz4s-profile/bin/../../h855kddqbay0pcbwr8a7i8m6ilz67cfn-python-3.10.7/lib/python3.10/site-packages' is not in list /gnu/store/kx98dz2vc3gdpjficy4nbd7rscnkvz4s-profile/bin/python3: No module named numpy.__main__; 'numpy' is a package and cannot be directly executed This error message is to be expected, and NumPy can be imported: Singularity> python3 Error in sitecustomize; set PYTHONVERBOSE for traceback: ValueError: '/gnu/store/kx98dz2vc3gdpjficy4nbd7rscnkvz4s-profile/bin/../../h855kddqbay0pcbwr8a7i8m6ilz67cfn-python-3.10.7/lib/python3.10/site-packages' is not in list Python 3.10.7 (main, Jan 1 1970, 00:00:01) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import numpy >>> What remains is the error message, which comes from a bug in Guix' sitecustomize.py. It compares a raw path (sys.prefix) with paths that have been normalized (os.path.normpath). That comparison fails if sys.prefix contains "../", as it does when run from a Singularity container. I will submit a patch for this. Cheers, Konrad