[vtkusers] Cannot import python bindings anymore: module 'dl' has no attribute 'RTLD_NOW'
Nicolas Cedilnik
nicolas.cedilnik at inria.fr
Sat Sep 23 04:03:04 EDT 2017
Hello,
Thanks for helping.
> Can you try importing the "dl" and "DLFCN" modules? Under Python 3,
> both should fail to load, and if they do load, then something is wrong
> and have to find out where Python is finding them.
The first one imports but I can't figure out where from, and the second
one doesn't import.
$ ipython
Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:51:32)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import dl
In [2]: dl.__file__
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-b1226f8e7c87> in <module>()
----> 1 dl.__file__
AttributeError: module 'dl' has no attribute '__file__'
In [3]: import DLFCN
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-3-fa2771fe0f81> in <module>()
----> 1 import DLFCN
ModuleNotFoundError: No module named 'DLFCN'
I've checked if something named dl was in my variable $PYTHONPATH
folders, but it isn't the case.
I do have a ~/dl folder though, and the problem disappears if I rename
it or don't launch the interpreter from the ~ folder. This is weird
because there's not ~/dl/__init__.py or ~/dl.py
I'm not sure whether this is VTK or python bug, but I've found a
workaround: launch the interpreter from somewhere else than my homedir.
Cheers,
-- Nicolas
More information about the vtkusers
mailing list