From nobody Wed Oct 19 17:35:01 2022 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MsyYl3GQlz4gV9c for ; Wed, 19 Oct 2022 17:35:39 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MsyYk5ClDz3nyQ for ; Wed, 19 Oct 2022 17:35:38 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-354c7abf786so175581167b3.0 for ; Wed, 19 Oct 2022 10:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenebras-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=aRMqb96dWhEIsyBTH0hy050CthBDPVx/HnXoPy+rwko=; b=k1hCndaL/R0CfrEc2rDXksObp+vbS1s7fy2VbSqzEr+MOfJuq63aCdWhKnjBKCxqZ4 29xhGZ8jscHOy92oc59iVaBMBsbtwNPEW27GN4usK3h477nAAWcKj5FRifu0Jo/JNffH ri8wvTSVcw2pM9CzPzJ9DA2SzVlJqkXv8tIOvLK9/xlPhkxvUvyG8q2WJ6G64nYbApAK n5yHfPGZwUcMlkS98mGLaUkrB758IvRaWoGdWnkoevgczYC8/hY8Lw1aTOIIaZ+zyhz+ umJQgqWfklp3PXT71oub2zR7TY7u1r2UEO+J7OF6veHdIRzudSyA0GGIPCl3Qh6yLlxg 0q5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aRMqb96dWhEIsyBTH0hy050CthBDPVx/HnXoPy+rwko=; b=YuSQnSEmtjR0B0GYRqTXrj2c0xvKbwCx+TT65WzwYjSVdh8XRPYodg8NX0C2R46y6Q rnIwDf5SNvCC6NMT5CERp3I7pq3s7xp8RmXGHAQijodjtNo3ETTvg7um+YfUvLKKW+E5 INcHSqOjTYZR620MCd6jIv6DlzFTrWruLSV/RxS0K9mY6ShYXfiSVm7x2STomi0T0GEP OYLkIRihc8am2To161I8sTJYoQRUnElXMHx4QEeONggndybq2SRcIy0je+e8K4E1hHx+ 80fiIJQp+3NEiITXsOhYkvzrEhKw+kEQhzZ5rDFIHa7EOlSwHg5AzL9GAMHU/pye6x+3 0XLQ== X-Gm-Message-State: ACrzQf0icBR/eS9hMGM8lVxNfJ/6U5hI9aJwszrXfneZu+AhhGKQwm5+ AEdejwQJBTXDFdvX+iGVh03YF1XbOSU66pPUzrtnbQ== X-Google-Smtp-Source: AMsMyM6/dXaaLMZfmwJqPKkY0FajJHqHijiQEu9iNzQJTIbAB97yD5qZYCiY0s1wpNzxQkta9Txy6vIpQ0l5oGqu8wg= X-Received: by 2002:a81:9ad8:0:b0:361:59c:a4c6 with SMTP id r207-20020a819ad8000000b00361059ca4c6mr8341162ywg.135.1666200937454; Wed, 19 Oct 2022 10:35:37 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Michael Sierchio Date: Wed, 19 Oct 2022 13:35:01 -0400 Message-ID: Subject: Re: proper python3 interpreter invocation To: Tomek CEDRO Cc: FreeBSD Questions Mailing List , freebsd-hackers@freebsd.org Content-Type: multipart/alternative; boundary="0000000000000071e505eb66a3a3" X-Rspamd-Queue-Id: 4MsyYk5ClDz3nyQ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tenebras-com.20210112.gappssmtp.com header.s=20210112 header.b=k1hCndaL; dmarc=none; spf=none (mx1.freebsd.org: domain of kudzu@tenebras.com has no SPF policy when checking 2607:f8b0:4864:20::112a) smtp.mailfrom=kudzu@tenebras.com X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.999]; R_DKIM_ALLOW(-0.20)[tenebras-com.20210112.gappssmtp.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; R_SPF_NA(0.00)[no SPF record]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::112a:from]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[tenebras-com.20210112.gappssmtp.com:+]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[tenebras.com]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --0000000000000071e505eb66a3a3 Content-Type: text/plain; charset="UTF-8" On Tue, Oct 18, 2022 at 6:07 PM Tomek CEDRO wrote: > > What would be the most valid way to invoke a Python 3 script? > > Two options are possible: > 1. #!/usr/bin/env python > 2. #!/usr/bin/env python3 > > Because there are so many python releases, I find it best to use venv and proceed from there. Especially when large and complex programs require different packages, some of which are not entirely compatible with others. The first invocation almost always will require the manual creation and management of a symlink. --0000000000000071e505eb66a3a3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Oct 18, 2022 at 6:07 PM Tomek CEDRO <tomek@cedro.info> wrote:

What would be the most valid way to invoke a Python 3 script?

Two options are possible:
1. #!/usr/bin/env python
2. #!/usr/bin/env python3


Because t= here are so many python releases, I find it best to use venv and proceed fr= om there.=C2=A0 Especially when large and complex programs require differen= t packages, some of which are not entirely compatible with others.

The first invocation almost always will require the manual creation a= nd management of a symlink.=C2=A0 =C2=A0
--0000000000000071e505eb66a3a3--