Closed
Description
while i click on open terminal in Anaconda Navigator,i got this error:
Last login: Thu Jun 1 16:31:16 on ttys001
/Users/Qi/.anaconda/navigator/a.tool ; exit;
# Qi @ 😃 in ~ [16:32:37]
$ /Users/xxx/.anaconda/navigator/a.tool ; exit;
/Users/xxx/.anaconda/navigator/a.tool: line 1: syntax error near unexpected token `('
/Users/xxx/.anaconda/navigator/a.tool: line 1: `bash --init-file <(echo "source activate /Users/xxx/anaconda/anaconda;")'
[Process completed]
system info:
$ conda info
Current conda install:
platform : osx-64
conda version : 4.3.21
conda is private : False
conda-env version : 4.3.21
conda-build version : not installed
python version : 3.6.1.final.0
requests version : 2.14.2
root environment : /Users/xxx/anaconda/anaconda (writable)
default environment : /Users/xxx/anaconda/anaconda
envs directories : /Users/xxxx/anaconda/anaconda/envs
/Users/xxx/.conda/envs
package cache : /Users/Qi/anaconda/anaconda/pkgs
/Users/xxx/.conda/pkgs
channel URLs : https://repo.continuum.io/pkgs/free/osx-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/r/osx-64
https://repo.continuum.io/pkgs/r/noarch
https://repo.continuum.io/pkgs/pro/osx-64
https://repo.continuum.io/pkgs/pro/noarch
config file : /Users/xxx/.condarc
netrc file : None
offline mode : False
user-agent : conda/4.3.21 requests/2.14.2 CPython/3.6.1 Darwin/15.6.0 OSX/10.11.6
UID:GID : 501:20
MacOS is currently at version 10.11.6 (15G1217)
I reinstalled serval times, but keep getting this error.don't what's wrong with it
i found this and tried, but not working
https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/GsXlOi48d7Y
Activity
goanpeca commentedon Jun 1, 2017
@martindurant do you have idea of what is going on?
goanpeca commentedon Jun 1, 2017
If you open ipython you see the same problem?
martindurant commentedon Jun 1, 2017
The message suggests that the bash syntax in the temporary script is not valid in zsh. I've never used zsh... What surprises me, is that the same file apparently calls a different shell interpreter depending on your setup. Is there a way in darwin to be specific?
(for the record, osx provided by far the most problems in this regard)
goanpeca commentedon Jun 1, 2017
Ohh, @liqimore ok we only support bash (on OSX)!
liqimore commentedon Jun 3, 2017
Thanks guys! I'v figured it out and yes, It only support bash on OSX.I tried oh-my-zsh(fish) and something else, None of these works.Bash is the only one that works on my machine.It might because the syntax difference between bash and other shells.
And way, Thanks!
goanpeca commentedon Jun 3, 2017
@liqimore we will introduce a more general syntax for version 1.6.3 so that it should work on most other terminals :-)
goanpeca commentedon Jun 6, 2017
Issue moved to ContinuumIO/navigator #1229 via ZenHub
Evanqiao commentedon Jul 8, 2017
@liqimore I have the problem too. I find that using "chsh -s /bin/bash" switch sh to bash can makeAnaconda Navigator work. Then I can also use "chsh -s /bin/zsh" to switch sh to zsh.
daehyunpy commentedon Apr 8, 2018
a.tool
file seems like generated every time before it called; and the contents is just a linebash --init-file <(echo "source activate PATH_TO_ANACONDA;")
. Why don't we just add#!/bin/bash
before the line when the file will be generated. Then it should work on any shells.martindurant commentedon Apr 8, 2018
cc @goanpeca
af001 commentedon Apr 21, 2018
Quick fix is to change shells before opening the terminal for your environment:
+1 to @Evanqiao solution
heitaoq66 commentedon Sep 30, 2018
This problem is a problem with the zsh environment variable, the solution
echo 'source ~/.bash_profile' >> ~/.zshrc
Append the bash environment variable to zsh
frank890417 commentedon Oct 23, 2018
@heitaoq66 Solved like a charm when using ZSH!
ck244 commentedon Jan 6, 2019
I found that sourcing .bash_profile was preventing me from running zsh at all, so I just appended
export PATH="/Users/(username)/anaconda/bin:$PATH"
to my .zshrc file and that worked.lporras commentedon Jun 5, 2019
I found this post that helped me:
https://medium.com/@sumitmenon/how-to-get-anaconda-to-work-with-oh-my-zsh-on-mac-os-x-7c1c7247d896
stings8 commentedon Oct 10, 2019
the @ck244 solution worked for me
DrMcQ commentedon Oct 22, 2019
I have the same issue and I couldn't figure it out. I couldn't update anything in Anaconda. When I opened the terminal, it asked me to change the shell to ZSH. I did so. Then, the following issue happened. I have tried to change the shell to BASH, yet still doesn't work.
Last login: Tue Oct 22 16:11:48 on ttys000
/Users/yulin/.anaconda/navigator/a.tool ; exit;
lin@Dr ~ % /Users/lin/.anaconda/navigator/a.tool ; exit;
/Users/lin/.anaconda/navigator/a.tool: line 1: syntax error near unexpected token
(' /Users/lin/.anaconda/navigator/a.tool: line 1:
bash --init-file <(echo "source activate /opt/anaconda3;")'[Process completed]
vin-ni commentedon Dec 26, 2019
I hat to
conda init zsh
to get conda to work with the shell