Brett Cannon on Nostr: #Python tip: do **not** require a virtual environment to be activated for your code ...
#Python tip: do **not** require a virtual environment to be activated for your code to work.
Virtual environment activation is a development feature/perk and **not** required for the Python interpreter to work. If you need to execute some Python code using the same interpreter as the one that's running then you can always get the interpreter's path from `sys.executable`.
Published at
2024-02-28 19:23:09Event JSON
{
"id": "eae091a17e6aa5647179edf828a765d0bd92b3324726ca60a021ab71c8c0c58b",
"pubkey": "4b4002d3714d074cc31210e9e65088406e9f62154010da12c339d41b18b30f21",
"created_at": 1709144589,
"kind": 1,
"tags": [
[
"t",
"python"
],
[
"proxy",
"https://fosstodon.org/users/brettcannon/statuses/112010499811413021",
"activitypub"
]
],
"content": "#Python tip: do **not** require a virtual environment to be activated for your code to work.\n\nVirtual environment activation is a development feature/perk and **not** required for the Python interpreter to work. If you need to execute some Python code using the same interpreter as the one that's running then you can always get the interpreter's path from `sys.executable`.",
"sig": "2b70c01117ba308685f138844bf651af530dd6f54be87fd5b9a3f8ef74e00b698e98af6952fbf11371550ae99c0197dab52032b191b5c50362321dfd2f150619"
}