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

Post Reply
cassiehu
Posts: 35
Joined: Tue Sep 06, 2022 10:41 am

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

Post 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
cassiehu
Posts: 35
Joined: Tue Sep 06, 2022 10:41 am

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

Post 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.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

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

Post 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?
cassiehu
Posts: 35
Joined: Tue Sep 06, 2022 10:41 am

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

Post 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?
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

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

Post 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?
cassiehu
Posts: 35
Joined: Tue Sep 06, 2022 10:41 am

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

Post 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
cassiehu
Posts: 35
Joined: Tue Sep 06, 2022 10:41 am

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

Post 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
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

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

Post 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
cassiehu
Posts: 35
Joined: Tue Sep 06, 2022 10:41 am

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

Post 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.
cassiehu
Posts: 35
Joined: Tue Sep 06, 2022 10:41 am

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

Post 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.
cassiehu
Posts: 35
Joined: Tue Sep 06, 2022 10:41 am

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

Post 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?
cassiehu
Posts: 35
Joined: Tue Sep 06, 2022 10:41 am

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

Post by cassiehu »

Nope, I installed Microsoft MPI, the error was still there.::::(
cassiehu
Posts: 35
Joined: Tue Sep 06, 2022 10:41 am

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

Post 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/
Post Reply