Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anaconda won't start in my Mac terminal(ZSH) #1831

Closed
liqimore opened this issue Jun 1, 2017 · 18 comments
Closed

Anaconda won't start in my Mac terminal(ZSH) #1831

liqimore opened this issue Jun 1, 2017 · 18 comments
Labels

Comments

@liqimore
Copy link

@liqimore liqimore commented Jun 1, 2017

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

@goanpeca

This comment has been minimized.

Copy link

@goanpeca goanpeca commented Jun 1, 2017

@martindurant do you have idea of what is going on?

@goanpeca

This comment has been minimized.

Copy link

@goanpeca goanpeca commented Jun 1, 2017

If you open ipython you see the same problem?

@goanpeca goanpeca self-assigned this Jun 1, 2017
@martindurant

This comment has been minimized.

Copy link

@martindurant martindurant commented 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

This comment has been minimized.

Copy link

@goanpeca goanpeca commented Jun 1, 2017

Ohh, @liqimore ok we only support bash (on OSX)!

@liqimore

This comment has been minimized.

Copy link
Author

@liqimore liqimore commented 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

This comment has been minimized.

Copy link

@goanpeca goanpeca commented 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 goanpeca closed this Jun 6, 2017
@goanpeca

This comment has been minimized.

Copy link

@goanpeca goanpeca commented Jun 6, 2017

Issue moved to ContinuumIO/navigator #1229 via ZenHub

@Evanqiao

This comment has been minimized.

Copy link

@Evanqiao Evanqiao commented 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

This comment has been minimized.

Copy link

@DaehyunPY DaehyunPY commented Apr 8, 2018

a.tool file seems like generated every time before it called; and the contents is just a line bash --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

This comment has been minimized.

Copy link

@martindurant martindurant commented Apr 8, 2018

@af001

This comment has been minimized.

Copy link

@af001 af001 commented Apr 21, 2018

Quick fix is to change shells before opening the terminal for your environment:

chsh -s /bin/bash

+1 to @Evanqiao solution

@heitaoq66

This comment has been minimized.

Copy link

@heitaoq66 heitaoq66 commented 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

This comment has been minimized.

Copy link

@frank890417 frank890417 commented Oct 23, 2018

@heitaoq66 Solved like a charm when using ZSH!

@ck244

This comment has been minimized.

Copy link

@ck244 ck244 commented 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

This comment has been minimized.

Copy link

@lporras lporras commented Jun 5, 2019

@stings8

This comment has been minimized.

Copy link

@stings8 stings8 commented Oct 10, 2019

the @ck244 solution worked for me

@DrMcQ

This comment has been minimized.

Copy link

@DrMcQ DrMcQ commented 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

This comment has been minimized.

Copy link

@vin-ni vin-ni commented Dec 26, 2019

I hat to conda init zsh to get conda to work with the shell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can鈥檛 perform that action at this time.