From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UGJTIh7p614nawAA0tVLHw (envelope-from ) for ; Thu, 18 Jun 2020 22:22:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id OAM9Hh7p617lNwAAbx9fmQ (envelope-from ) for ; Thu, 18 Jun 2020 22:22:22 +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 E25199402D6 for ; Thu, 18 Jun 2020 22:22:21 +0000 (UTC) Received: from localhost ([::1]:42284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jm2vM-0005Fp-0S for larch@yhetil.org; Thu, 18 Jun 2020 18:22:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jm2vE-0005Ff-T8 for help-guix@gnu.org; Thu, 18 Jun 2020 18:22:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49599) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jm2vE-0006iF-Km; Thu, 18 Jun 2020 18:22:12 -0400 Received: from ti0006q161-2604.bb.online.no ([84.202.68.75]:39100 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jm2vE-00039e-4o; Thu, 18 Jun 2020 18:22:12 -0400 From: Marius Bakke To: Zelphir Kaltstahl , help-guix Subject: Re: Profiles for Python projects In-Reply-To: References: Date: Fri, 19 Jun 2020 00:22:09 +0200 Message-ID: <875zbodnfy.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: -3.11 X-TUID: TGeadpHkizUp --=-=-= Content-Type: text/plain Hi Zelphir, Zelphir Kaltstahl writes: > I create a profile with that and it works fine: > > guix package --manifest="manifest.scm" --profile="${GUIX_EXTRA_PROFILES}"/my-env/my-env > > Then I do the sourcing: > > GUIX_PROFILE="${GUIX_EXTRA_PROFILES}/my-env/my-env"; source "${GUIX_PROFILE}/etc/profile" [...] > I also get a path in the profile I created. So far all seems to just > work. However, then I hit a snag when trying to run the tests of the > project: > > LOG_LEVEL="DEBUG" PYTHONPATH="$(pwd)/my_project" python3 -m pytest -m "my_test_marker" -s -vvv > > I now get the error: > > No module named pytest This is because you are overriding PYTHONPATH. If you run it as ... LOG_LEVEL="DEBUG" PYTHONPATH="$(pwd)/my_project:$PYTHONPATH" python3 -m pytest -m "my_test_marker" -s -vvv ... you might have better luck. Guix relies on PYTHONPATH to make Python modules available because there is no single site-packages directory like in some other distributions. HTH! Marius --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl7r6REACgkQoqBt8qM6 VPrp9wgAy8RyMi9GpX7boS5ONR7K+Rc24wGCVWKQFQej2efWArmxGNLEMerNEicr KAQdfOyBdseqNV6e2lc4b1DwmCoMAPliET25wLfzJ0xNLoKa5JZ7n79mXRhNRpOp 2RTim01wq8cXc9VvsyN7svPncCiE7J8rRHk1scooez+BE8Xkv/6OS4iDYlJYtBKX MYMqlMx8eLy94L+18sZIv9WjpH3Ur3rkJaOAkD/TuhMsIhxBPqarZKDO0Us3lm01 UqPyY91JD6R+d7s8I6w6LyeS8noxH2ivJA3xVCqmMF07l2U1Xa217ZEQPZZvHPfI nNx+LbZq6J6nyJneraJwAu7I2RrCaA== =0858 -----END PGP SIGNATURE----- --=-=-=--