Bug#895531: SV: Unable to import neuron in python3
Johannes Hjorth
hjorth at kth.se
Mon Apr 16 09:18:02 BST 2018
I just found the problem while going through the verbose output. I have a subdirectory named "hoc" in my work directory which must have caused a name conflict.
I did a test, started python3 in another directory, imported neuron, it worked. Then I created a new subdirectory called hoc and again started python3 and imported neuron, it then failed.
$ python3
Python 3.6.5rc1 (default, Mar 14 2018, 06:54:23)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import neuron
NEURON -- VERSION 7.5 master (6b4c19f) 2017-09-25
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2016
See http://neuron.yale.edu/neuron/credits
>>>
$ mkdir hoc
$ python3
Python 3.6.5rc1 (default, Mar 14 2018, 06:54:23)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import neuron
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/neuron/__init__.py", line 114, in <module>
import nrn
ModuleNotFoundError: No module named 'nrn'
>>>
$ rmdir hoc
________________________________________
Från: k.matthias12 at gmail.com <k.matthias12 at gmail.com> för Matthias Klumpp <mak at debian.org>
Skickat: den 16 april 2018 07:39
Till: 895531 at bugs.debian.org; Johannes Hjorth
Ämne: Re: Unable to import neuron in python3
i!
Interesting, this works here without problems (vanilla Debian installation):
```
$ python3
Python 3.6.5rc1 (default, Mar 14 2018, 10:54:23)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import neuron
NEURON -- VERSION 7.5 master (6b4c19f) 2017-09-25
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2016
See http://neuron.yale.edu/neuron/credits
>>>
```
The "nrn" module is a built-in module. Do you have any bits of a
different NEURON installation floating around that might interfere
with the package? Could you run the Python interpreter in verbose mode
(python3 -v) and try to import the module again (and paste the
output)? That would help to determine what is different between the
attempts to load the module.
Cheers,
Matthias
--
I welcome VSRE emails. See http://vsre.info/
More information about the debian-science-maintainers
mailing list