DLL load failed in Windows10

Post Reply
kazutaka
Posts: 3
Joined: Tue Aug 04, 2020 8:17 am

DLL load failed in Windows10

Post by kazutaka »

Hi everyone

I'm struggling with installing the NEURON in my windows10 machine
I use python3.7.6 downloaded from anaconda3 and NEURON7.7.2.7.7 downloaded from website

when I type
import neuron
after executing ipython, i got this error message

Code: Select all

In [1]: import neuron
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
c:\nrn\lib\python\neuron\__init__.py in <module>
    105 try:
--> 106     import hoc
    107 except:

ModuleNotFoundError: No module named 'hoc'

During handling of the above exception, another exception occurred:

ModuleNotFoundError                       Traceback (most recent call last)
c:\nrn\lib\python\neuron\__init__.py in <module>
    109     #Python3.1 extending needs to look into the module explicitly
--> 110     import neuron.hoc
    111   except: # mingw name strategy

ModuleNotFoundError: No module named 'neuron.hoc'

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
<ipython-input-1-5a1e2e1935ff> in <module>
----> 1 import neuron

c:\nrn\lib\python\neuron\__init__.py in <module>
    110     import neuron.hoc
    111   except: # mingw name strategy
--> 112     exec("import neuron.hoc%d%d as hoc" % (sys.version_info[0], sys.version_info[1]))
    113
    114 import nrn

c:\nrn\lib\python\neuron\__init__.py in <module>

ImportError: DLL load failed: 指定されたプロシージャが見つかりません。
I thik this is the same issue as posted before, but i was not able to find related solution

I would appreciate if you give me any suggestions
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: DLL load failed in Windows10

Post by ted »

Instead of

import neuron
import hoc

try this:
from neuron import h

What happens?
kazutaka
Posts: 3
Joined: Tue Aug 04, 2020 8:17 am

Re: DLL load failed in Windows10

Post by kazutaka »

Hi Ted

Thank you for your reply
I got the same error message when I

Code: Select all

from neuron import h
and i noticed that this error message showed up when I used git Bash

when I use command prompt or anaconda prompt, i got another error message like this
In [3]: from neuron import h
Traceback (most recent call last):

File "C:\Users\17186\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3331, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

File "<ipython-input-3-b535810084d5>", line 1, in <module>
from neuron import h

File "C:\Users\17186\py3env\Lib\site-packages\neuron\__init__.py", line 90
print "Found NEURON at", neuronhome
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Found NEURON at", neuronhome)?
Thanks!
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: DLL load failed in Windows10

Post by hines »

File "C:\Users\17186\py3env\Lib\site-packages\neuron\__init__.py", line 90
I'm puzzled by this because on windows 10 the neuron module is in

Code: Select all

c:\nrn\lib\python\neuron
Do you have an old installation from pip install from a third party? It has been a long time since __init__.py had python 2 limited syntax for print.

With respect to NEURON7.7.2.7.7. We are in the process of replacing that with a new NEURON 7.8 standard distribution. I think there is a chance
that your problem may just go away if you uninstall your current version and install what will be the new standard distribution
https://neuron.yale.edu/ftp/neuron/vers ... -setup.exe
kazutaka
Posts: 3
Joined: Tue Aug 04, 2020 8:17 am

Re: DLL load failed in Windows10

Post by kazutaka »

Dear Hines

After re-installing the NEURON7.8.1 with setup.exe, NEURON works well
Thank you so much!
Post Reply