Talk:Python: Difference between revisions
imported>Red-hood Information about conda seems wrong |
Turbotimon (talk | contribs) |
||
(6 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
== Conda == | == Conda == | ||
conda-env does not exist after entering the conda-shell without first calling conda-install, so I think the wiki is missleading here, or the package has a bug. | conda-env does not exist after entering the conda-shell without first calling conda-install, so I think the wiki is missleading here, or the package has a bug. | ||
conda-shell, conda-install have no effect and nothing happens. Bash just says it can't find that command. | |||
== shellHook explanation == | |||
It's not clear what the meaning of all the `shellHook` stuff is for, esp. the <code>unset SOURCE_DATE_EPOCH</code> bit. | |||
== How to use specific Python version? == | |||
I'm working on a project where we're using a specific patch version of Python. How would I set this up? [https://stackoverflow.com/q/68658367/96588 This] uses a Python fork, but I'm looking for a specific version of the official Python package. | |||
[[User:L0b0|L0b0]] ([[User talk:L0b0|talk]]) 22:01, 19 September 2021 (UTC) | |||
== Flake example for use with nix develop == | |||
I was trying to get python with packages as defined by a flake, and found https://dev.to/deciduously/workspace-management-with-nix-flakes-jupyter-notebook-example-2kke a useful discussion. I propose to add an example: | |||
<syntaxHighlight lang="nix"> | |||
{ | |||
description = "Python environment"; | |||
inputs.nixpkgs.url = "nixpkgs/nixos-22.11"; | |||
outputs = {nixpkgs, ...}: let | |||
system = "x86_64-linux"; | |||
pkgs = import nixpkgs {inherit system;}; | |||
in { | |||
devShells.${system}.default = pkgs.mkShell { | |||
buildInputs = [ | |||
(pkgs.python3.withPackages (p: [ | |||
p.requests | |||
])) | |||
]; | |||
shellHook = "python"; | |||
}; | |||
}; | |||
} | |||
</syntaxHighlight> | |||
== Full == | |||
Can we add a section about Full (e.g. python312Full) and non-Full (e.g. python312) versions? Whats the difference and in which situation use on or the other? |
Latest revision as of 10:30, 18 December 2024
Conda
conda-env does not exist after entering the conda-shell without first calling conda-install, so I think the wiki is missleading here, or the package has a bug. conda-shell, conda-install have no effect and nothing happens. Bash just says it can't find that command.
shellHook explanation
It's not clear what the meaning of all the `shellHook` stuff is for, esp. the unset SOURCE_DATE_EPOCH
bit.
How to use specific Python version?
I'm working on a project where we're using a specific patch version of Python. How would I set this up? This uses a Python fork, but I'm looking for a specific version of the official Python package.
L0b0 (talk) 22:01, 19 September 2021 (UTC)
Flake example for use with nix develop
I was trying to get python with packages as defined by a flake, and found https://dev.to/deciduously/workspace-management-with-nix-flakes-jupyter-notebook-example-2kke a useful discussion. I propose to add an example:
{
description = "Python environment";
inputs.nixpkgs.url = "nixpkgs/nixos-22.11";
outputs = {nixpkgs, ...}: let
system = "x86_64-linux";
pkgs = import nixpkgs {inherit system;};
in {
devShells.${system}.default = pkgs.mkShell {
buildInputs = [
(pkgs.python3.withPackages (p: [
p.requests
]))
];
shellHook = "python";
};
};
}
Full
Can we add a section about Full (e.g. python312Full) and non-Full (e.g. python312) versions? Whats the difference and in which situation use on or the other?