-
Notifications
You must be signed in to change notification settings - Fork 94
Test python library: dependencies not automatically imported? #484
Copy link
Copy link
Open
Description
I tried to review a python library (NixOS/nixpkgs#398351) by doing:
$ nixpkgs-review pr 398351
$ python
>>> import picos
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/nix/store/qmsllz8m16lc6s2kph2skz4z9g670qdb-python3.13-picos-2.6.1/lib/python3.13/site-packages/picos/__init__.py", line 43, in <module>
from . import settings, uncertain # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/qmsllz8m16lc6s2kph2skz4z9g670qdb-python3.13-picos-2.6.1/lib/python3.13/site-packages/picos/uncertain.py", line 27, in <module>
from .expressions.uncertain import (IntractableWorstCase, # noqa
File "/nix/store/qmsllz8m16lc6s2kph2skz4z9g670qdb-python3.13-picos-2.6.1/lib/python3.13/site-packages/picos/expressions/__init__.py", line 28, in <module>
from .algebra import * # noqa
^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/qmsllz8m16lc6s2kph2skz4z9g670qdb-python3.13-picos-2.6.1/lib/python3.13/site-packages/picos/expressions/algebra.py", line 27, in <module>
import cvxopt
File "/nix/store/rk119pj16f652yld3bhn5v6m4fa0a8ks-python3.13-cvxopt-1.3.2/lib/python3.13/site-packages/cvxopt/__init__.py", line 57, in <module>
import cvxopt.base
ModuleNotFoundError: No module named 'cvxopt.base'
But I'm confused by this error since cvxopt is already included in the dependencies of this library:
dependencies = [
numpy
cvxopt
scipy
];
The fix I found for now is to manually import cvxopt like:
$ nixpkgs-review pr 398351 -p python3Packages.cvxopt -p python3Packages.picos
$ python
>>> import picos
>>>
and it works as expected. Yet, I don't understand why I need to do it manually.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels