From: "jgart" <jgart@dismail.de>
To: help-guix@gnu.org
Subject: shebang for python script?
Date: Wed, 25 Jan 2023 06:09:35 +0000 [thread overview]
Message-ID: <b689e8c713beda5b748c9817c58c5fd5@dismail.de> (raw)
Hi Guixers,
What's the current recommended way to do this in Guix?
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p "python3.withPackages(ps: [ ps.numpy ])"
import numpy as np
a = np.array([1,2])
b = np.array([3,4])
print(f"The dot product of {a} and {b} is: {np.dot(a, b)}")
next reply other threads:[~2023-01-25 6:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 6:09 jgart [this message]
2023-01-25 6:12 ` shebang for python script? jgart
2023-01-25 9:35 ` zimoun
2023-01-27 6:10 ` jgart
2023-01-27 11:15 ` Simon Tournier
2023-01-27 15:42 ` jgart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b689e8c713beda5b748c9817c58c5fd5@dismail.de \
--to=jgart@dismail.de \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).