| 11 Mar 2024 |
| Daniil Orekhov joined the room. | 17:50:16 |
Daniil Orekhov | i am trying to install sanic and getting No module named 'pkg_resources' for tracerite. I have tried adding setuptools as overrides to both sanic and tracerite, but the issue persists. Any suggestions on how to fix/dubug this issue? | 19:45:11 |
Daniil Orekhov | * i am trying to install sanic and getting No module named 'pkg_resources' for tracerite. I have tried adding setuptools as overrides to both sanic and tracerite, but the issue persists. Any suggestions on how to fix/debug this issue? | 19:45:27 |
| 12 Mar 2024 |
gaivs | Could you add pkg_resources, as that is the missing module? | 10:41:38 |
| 13 Mar 2024 |
matusf | Hello, how do you do local development with poetry2nix? I started from the template and created an app with mkPoetryApplication function and included it in a shell. Then I ran the package using python ./app/__init__.py and it successfully runs the program. I noticed that I can edit the sources and without rebuilding I'm able to run it with the same command and see the change. Is this the correct way to use poetry2nix for local development? Are there any pitfalls in this solution? I'm bit unsure because I've seen mkPoetryEditablePackage function. When should one use it instead of mkPoetryApplication as I described? | 01:24:29 |
| @dantefromhell:matrix.org joined the room. | 15:00:37 |
@dantefromhell:matrix.org | I'm using `poetry2nix` inside a flake and it duplicates my `systems` input via `inputs.flake-utils.systems`.
since `poetry2nix` already has `inputs.systems` I wonder if it's intentional that `flake-utils` is not following this input? | 15:05:22 |
| 14 Mar 2024 |
| @federicodschonborn:matrix.org left the room. | 02:04:48 |
| Vebjørn Halvorsen joined the room. | 12:31:31 |
Vebjørn Halvorsen | Im getting this error when trying to install tensorflow: 🤔
974| (old.buildInputs or [ ])
975| ++ [ pkgs.hdf5 self.pkg-config ]
| ^
976| ++ lib.optional mpiSupport mpi
Did you mean pkgconfig? | 12:32:31 |
| NixOS Moderation Botchanged room power levels. | 18:45:09 |
Charles Duffy | How does one set overlays &c when using mkPoetryScriptsPackage? I tried setting python = myPoetryEnv, but that's not actually putting the dependencies in that poetryEnv (which does have overrides &c defined) in the PYTHONPATH. | 20:40:19 |
| 15 Mar 2024 |
truh | In reply to @vbear:matrix.org Im getting this error when trying to install tensorflow: 🤔
974| (old.buildInputs or [ ]) 975| ++ [ pkgs.hdf5 self.pkg-config ] | ^ 976| ++ lib.optional mpiSupport mpi Did you mean pkgconfig? maybe you need self.pkgconfig instead of self.pkg-config | 11:05:14 |
| @grahamc:nixos.org joined the room. | 23:50:24 |
| 17 Mar 2024 |
| Felipe Marcelino joined the room. | 17:59:18 |
| 18 Mar 2024 |
truh | I'm getting ModuleNotFoundError: No module named 'poetry' for one of my dependencies even though I'm adding poetry-core to the buildInputs. Any suggestions what I could try to get it to build, short of changing the build system of the dependency?
The dependency in question is maphash and I'm its maintainer. It's possible that I didn't package it correctly but it works fine without poetry2nix and it's pretty basic as far as python packages go.
| 09:02:06 |
truh | * I'm getting ModuleNotFoundError: No module named 'poetry' for one of my dependencies even though I'm adding poetry-core to the buildInputs. Any suggestions what I could try to get it to build, short of changing the build system of the dependency?
The dependency in question is maphash and I'm its maintainer. It's possible that I didn't package it correctly but it works fine without poetry2nix and it's pretty basic as far as python packages go.
edit: Can't reproduce this in a repo without other dependencies, will have to give this some more thought.
| 09:22:39 |
truh | I had an error in my overrides, in addition to maphash = super.maphash.overridePythonAttrs .... I had some-other-package = super.maphash.overridePythonAttrs ..... I guess this lead to the overwritten maphash not getting evaluated properly.
I found this out by checking the maphash derivation with nix derivation show </nix/store ** maphash.drv> and not finding poetry-core in the buildInputs.
| 10:41:10 |
| ubbabeck set a profile picture. | 19:13:34 |
| 19 Mar 2024 |
| NixOS Moderation Botchanged room power levels. | 00:30:30 |
| latenighticecream joined the room. | 15:14:39 |
latenighticecream | Hey, I have a problem with a specific pypi module not working. It's mitsuba: https://pypi.org/project/mitsuba/. I have a simple pyproject.toml only including this and python 3.11. In a flake I am simply using mkPoetryEnv as a package for a devshell, like this:
devShells.default = pkgs.mkShell {
packages = [
(poetry2nix.mkPoetryEnv {
projectDir = ./src/code/notebooks;
python = pkgs.python311;
})
];
shellHook = ''
echo "hello :)"
'';
};
However, the mitsuba package produces this error:
error: builder for '/nix/store/8rhlcg4d3xy67a7jcmf52bjv48wiklg6-python3.11-mitsuba-3.5.0.drv' failed with exit code 1;
last 10 log lines:
> error: auto-patchelf could not satisfy dependency libdrjit-core.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/volpath.so
> error: auto-patchelf could not satisfy dependency libnanothread.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/volpath.so
> error: auto-patchelf could not satisfy dependency libdrjit-autodiff.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
> error: auto-patchelf could not satisfy dependency libdrjit-core.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
> error: auto-patchelf could not satisfy dependency libnanothread.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
> auto-patchelf failed to find all the required dependencies.
> Add the missing dependencies to --libs or use `--ignore-missing="foo.so.1 bar.so etc.so"`.
| 15:26:40 |
latenighticecream | Hey, I have a problem with a specific pypi module not working. It's mitsuba: https://pypi.org/project/mitsuba/. I have a simple pyproject.toml only including this and python 3.11. In a flake I am simply using mkPoetryEnv as a package for a devshell, like this:
devShells.default = pkgs.mkShell {
packages = [
(poetry2nix.mkPoetryEnv {
projectDir = ./src/code/notebooks;
python = pkgs.python311;
})
];
shellHook = ''
echo "hello :)"
'';
};
However, the mitsuba package produces this error:
error: builder for '/nix/store/8rhlcg4d3xy67a7jcmf52bjv48wiklg6-python3.11-mitsuba-3.5.0.drv' failed with exit code 1;
last 10 log lines:
> error: auto-patchelf could not satisfy dependency libdrjit-core.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/volpath.so
> error: auto-patchelf could not satisfy dependency libnanothread.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/volpath.so
> error: auto-patchelf could not satisfy dependency libdrjit-autodiff.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
> error: auto-patchelf could not satisfy dependency libdrjit-core.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
> error: auto-patchelf could not satisfy dependency libnanothread.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
> auto-patchelf failed to find all the required dependencies.
> Add the missing dependencies to --libs or use `--ignore-missing="foo.so.1 bar.so etc.so"`.
...
Its referring to libdrjit-core.so, etc which seem to be produced by mitsuba itself (?). I have absolutely no idea what to do from here on | 15:28:12 |
| latenighticecream set a profile picture. | 15:30:26 |
AngryAnt | In reply to @latenighticecream:matrix.org Hey, I have a problem with a specific pypi module not working. It's mitsuba: https://pypi.org/project/mitsuba/. I have a simple pyproject.toml only including this and python 3.11. In a flake I am simply using mkPoetryEnv as a package for a devshell, like this:
devShells.default = pkgs.mkShell {
packages = [
(poetry2nix.mkPoetryEnv {
projectDir = ./src/code/notebooks;
python = pkgs.python311;
})
];
shellHook = ''
echo "hello :)"
'';
};
However, the mitsuba package produces this error:
error: builder for '/nix/store/8rhlcg4d3xy67a7jcmf52bjv48wiklg6-python3.11-mitsuba-3.5.0.drv' failed with exit code 1;
last 10 log lines:
> error: auto-patchelf could not satisfy dependency libdrjit-core.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/volpath.so
> error: auto-patchelf could not satisfy dependency libnanothread.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/volpath.so
> error: auto-patchelf could not satisfy dependency libdrjit-autodiff.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
> error: auto-patchelf could not satisfy dependency libdrjit-core.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
> error: auto-patchelf could not satisfy dependency libnanothread.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
> auto-patchelf failed to find all the required dependencies.
> Add the missing dependencies to --libs or use `--ignore-missing="foo.so.1 bar.so etc.so"`.
...
Its referring to libdrjit-core.so, etc which seem to be produced by mitsuba itself (?). I have absolutely no idea what to do from here on You need to supply those libraries into the poetry context via overrides. Here's an example of doing that with some cuda & tensorflow packages: https://gist.github.com/AngryAnt/3386008247b5c984238f4ec33361ac8d | 16:49:57 |
AngryAnt | If those libraries are not already packaged, you need to fetch them from where-ever mitsuba makes them available and pass that into your overrides. | 16:51:35 |
latenighticecream | thank you for your answer! i will try it tomorrow | 17:49:14 |
| eyalch joined the room. | 18:00:03 |
| 20 Mar 2024 |
latenighticecream | @AngryAnt So i found out that those libraries come from a different python package (https://pypi.org/project/drjit/) which is not available as a nix package. Does this mean I need to create a derivation for this (e.g. using buildPythonPackage) and then put this into the override or can I somehow refer to it using poetry2nix directly? | 18:14:09 |
latenighticecream | I tried doing it like this:
drjit = my-python.pkgs.buildPythonPackage {
pname = "drjit";
version = "0.4.4";
format = "wheel";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/[...].whl";
hash = "[...]";
};
}; | 19:16:10 |