Bug#896421: python3-lasagne: lasagne fails to import

Helmut Grohne helmut at subdivi.de
Fri Apr 20 21:01:29 BST 2018


Package: python3-lasagne
Version: 0.1+git20180322.37ca134-1
Severity: serious
User: helmutg at debian.org
Usertags: python-import

After installing python3-lasagne importing the module lasagne
into a python interpreter fails with the following error:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/theano/configdefaults.py", line 1738, in filter_compiledir
    os.makedirs(path, 0o770)  # read-write-execute for user and group
  File "/usr/lib/python3.6/os.py", line 210, in makedirs
    makedirs(head, mode, exist_ok)
  File "/usr/lib/python3.6/os.py", line 210, in makedirs
    makedirs(head, mode, exist_ok)
  File "/usr/lib/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/nonexistent'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/lasagne/__init__.py", line 12, in <module>
    import theano
  File "/usr/lib/python3/dist-packages/theano/__init__.py", line 66, in <module>
    from theano.compile import (
  File "/usr/lib/python3/dist-packages/theano/compile/__init__.py", line 10, in <module>
    from theano.compile.function_module import *
  File "/usr/lib/python3/dist-packages/theano/compile/function_module.py", line 21, in <module>
    import theano.compile.mode
  File "/usr/lib/python3/dist-packages/theano/compile/mode.py", line 10, in <module>
    import theano.gof.vm
  File "/usr/lib/python3/dist-packages/theano/gof/vm.py", line 662, in <module>
    from . import lazylinker_c
  File "/usr/lib/python3/dist-packages/theano/gof/lazylinker_c.py", line 42, in <module>
    location = os.path.join(config.compiledir, 'lazylinker_ext')
  File "/usr/lib/python3/dist-packages/theano/configparser.py", line 333, in __get__
    self.__set__(cls, val_str)
  File "/usr/lib/python3/dist-packages/theano/configparser.py", line 344, in __set__
    self.val = self.filter(val)
  File "/usr/lib/python3/dist-packages/theano/configdefaults.py", line 1745, in filter_compiledir
    " '%s'. Check the permissions." % path)
ValueError: Unable to create the compiledir directory '/nonexistent/.theano/compiledir_Linux-4.14--amd64-x86_64-with-debian-buster-sid--3.6.5-64'. Check the permissions.

The vast majority of import failures is attributed to missing dependencies.
Often times that manifests as an ImportError or ModuleNotFoundError.
Typically, dependencies should be inserted by dh-python via ${python:Depends}
or ${python3:Depends}. Thus a missing dependency can be caused by incomplete
install_requires in setup.py. Sometimes a missing dependency of a dependency
is the cause, in such cases this bug should be reassigned.

Helmut



More information about the debian-science-maintainers mailing list