Page 1 of 1

bash:........bad interepter. no such file or directory

Posted: Sat Sep 17, 2022 9:20 am
by cassiehu
I met the problems when I used nrngui.(This is because I wanted to check the compiled .mod file in NEURON or not. Before this, I never tried to run nrngui.exe) Firstly, it said "cannot find executable Python". Then I followed the instruction in a past topic"cannot find excutable Python or Python3". As a result, I uninstall the NEURON by click uninstall.exe in nrn file. However, after I reinstall the new nersion of NEURON, I found that a new error appeared when I open nrngui, which is "bash: /cygdrive/d/ProgramData/DassaultSystemes/neuron_anzhuang/nrn/bin/nrnpyenv.sh: /usr/bin/env: bad interpreter: No such file or directory". I don't know why and I searched in the forum but I cannot find the same question. Can anyone help me out of this problem.
https://pic.imgdb.cn/item/6325c9c416f2c2beb1594f4e.png

Re: bash:........bad interepter. no such file or directory

Posted: Sat Sep 17, 2022 9:40 am
by cassiehu
cassiehu wrote: Sat Sep 17, 2022 9:20 am I met the problems when I used nrngui.(This is because I wanted to check the compiled .mod file in NEURON or not. Before this, I never tried to run nrngui.exe) Firstly, it said "cannot find executable Python". Then I followed the instruction in a past topic"cannot find excutable Python or Python3". As a result, I uninstall the NEURON by click uninstall.exe in nrn file. However, after I reinstall the new nersion of NEURON, I found that a new error appeared when I open nrngui, which is "bash: /cygdrive/d/ProgramData/DassaultSystemes/neuron_anzhuang/nrn/bin/nrnpyenv.sh: /usr/bin/env: bad interpreter: No such file or directory". I don't know why and I searched in the forum but I cannot find the same question. Can anyone help me out of this problem.
https://pic.imgdb.cn/item/6325c9c416f2c2beb1594f4e.png
Plus, I have already added the system path of nrn\bin and nrn\mingw\usr\bin. The error was still there.

Re: bash:........bad interepter. no such file or directory

Posted: Mon Sep 19, 2022 2:21 pm
by ted
Which version of NEURON are you using, and exactly what version and distribution Python are you using? And what bash are you using--the one that comes with NEURON, or something else? And are you first starting a bash shell, and then executing the command
nrngui
at the bash prompt?

Re: bash:........bad interepter. no such file or directory

Posted: Mon Sep 19, 2022 10:27 pm
by cassiehu
NEURON version:8.2(the newest version showing on the download page)
Python version:3.9
And I use PyCharm to run Python files.
Yes, I just clicked bash coming up with NEURON in the startup of WINDOWS. Then it appeared this error, and I tried a lot of times(uninstall and reinstall to different directories). I didn't try to type nrngui in bash command because when I clicked nrngui alone in NEURON there was still the error. No matter whether I clicked "Set DOS Environment(useful if you want to launch IPython" in the installment process, the bash error was still there. Was it possible that I uninstall it wrongly?

Re: bash:........bad interepter. no such file or directory

Posted: Mon Sep 19, 2022 10:38 pm
by ted
Python version:3.9
What distribution? That is, who created the installer? python.org? Anaconda? Microsoft? Some other source? If that sounds like a strange question, read this: https://www.infoworld.com/article/32679 ... -need.html

And also: what version of Windows are you using? 10? 11?

Re: bash:........bad interepter. no such file or directory

Posted: Mon Sep 19, 2022 11:07 pm
by cassiehu
WinPython distribution, windows version is 11.
And I think I can post a picture of starting nrngui-python which contains two errors:1.bash.....no such file or directory 2.could not find ".......python.exe"
https://pic.imgdb.cn/item/63292e9316f2c2beb16ca843.png

Re: bash:........bad interepter. no such file or directory

Posted: Mon Sep 19, 2022 11:15 pm
by cassiehu
I am sorry, that Python distribution should be Microsoft(I have anaconde and winpython distribution also.) Plus, I also have the question that how to let NEURON use the Python distribution that I want to. I checked the directory of that python.exe, it is trully a file has 0 kB. But the interepter I use on PyCharm has the same root directory with this python.exe and that is normal to use. (The picture shows the Python distribution used on PyCharm)
https://pic.imgdb.cn/item/632930a216f2c2beb16ea05c.png

Re: bash:........bad interepter. no such file or directory

Posted: Tue Sep 20, 2022 12:19 am
by ted
NEURON and Anaconda generally work well together under Windows. But who knows what conflicts might arise when multiple Python distributions are installed. I am sure that there are people who use other Python distributions with NEURON under Windows, and maybe some of them have multiple distributions of Python installed. If any of them has words of wisdom for you, this thread is their opportunity to shine.

But my advice to you is: uninstall NEURON, and uninstall all of those Pythons that are currently on your PC. Then
1. reboot
2. install and test Anaconda
and finally
3. install NEURON
4. launch NEURON's bash shell, and use it to cd to the directory that contains your .mod files, and if you see an x86_64 directory there, delete it and its contents
5. compile the mod files by executing
nrnivmodl
6. launch NEURON by executing
nrngui
and see if NEURON says anything about loading mechanisms

Re: bash:........bad interepter. no such file or directory

Posted: Tue Sep 20, 2022 3:35 am
by cassiehu
Thanks for your reply very much. Maybe it is a better choice for me to change a new Windows device and install Anaconda only and NEURON. Hope there was no mistake this time.

Re: bash:........bad interepter. no such file or directory

Posted: Wed Sep 21, 2022 3:36 am
by cassiehu
I changed another computer(which is also windows system), and I uninstall all the Python distributions before. Then I reboot and install latest Anaconda and test it. The results are successful. Then I download installing programm from NEURON website and install it. However, when I open bash, there was still the no such file or directory error. But the error of could not find".......\python.exe" is gone. So I think there definitely be some problems of my installing manipullations of NEURON. Because that computer is a completely "new" computer for NEURON installing.

Re: bash:........bad interepter. no such file or directory

Posted: Wed Sep 21, 2022 3:49 am
by cassiehu
cassiehu wrote: Wed Sep 21, 2022 3:36 am I changed another computer(which is also windows system), and I uninstall all the Python distributions before. Then I reboot and install latest Anaconda and test it. The results are successful. Then I download installing programm from NEURON website and install it. However, when I open bash, there was still the no such file or directory error. But the error of could not find".......\python.exe" is gone. So I think there definitely be some problems of my installing manipullations of NEURON. Because that computer is a completely "new" computer for NEURON installing.
I just realized that I did not install Microsoft MPI on the computer. Would that be the influences?

Re: bash:........bad interepter. no such file or directory

Posted: Wed Sep 21, 2022 4:23 am
by cassiehu
Nope, I installed Microsoft MPI, the error was still there.::::(

Re: bash:........bad interepter. no such file or directory

Posted: Wed Sep 21, 2022 6:34 am
by cassiehu
It is okay know. The question has been solved by installing 8.0version of NEURON. This is because I searched that type of error on Internet, it is likely a scripting problem of source code or something. As a result, no matter in which computer, the error was still there if using the same installer. So maybe the professional programmer should check that again. I post a website here that tells the possible reasons.
https://www.positioniseverything.net/ba ... directory/