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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jupyter_mac.command is not executable with fish. #8222

Open
hal0taso opened this issue Jan 21, 2018 · 11 comments
Open

jupyter_mac.command is not executable with fish. #8222

hal0taso opened this issue Jan 21, 2018 · 11 comments

Comments

@hal0taso
Copy link

hal0taso commented Jan 21, 2018

Actual Behavior

Getting following error when I launch Jupyter-notebook via Anaconda-Navigator.

/Users/hal0taso/anaconda3/bin/jupyter_mac.command ; exit;
Failed to execute process '/Users/hal0taso/anaconda3/bin/jupyter_mac.command'. Reason:
exec: Exec format error
The file '/Users/hal0taso/anaconda3/bin/jupyter_mac.command' is marked as an executable but could not be run by the operating system.

and Jupyter-notebook does not launch.

Expected Behavior

execute jupyter_mac.command, and it should be launch jupyter-notebook

Steps to Reproduce

jupyter_mac.command is following script.

DIR=$(dirname $0)

$DIR/jupyter-notebook

This script only executes jupyter-notebook on same directory but doesn't assign which interpreter it uses.

so when you execute this script with fish, you can get this error.

(My login shell is fish, so it doesn't work. When I execute jupyter_mac.command via sh or bash, it work.)

Anaconda or Miniconda version:
Anaconda-Navigator 1.6.9
Jupyter-notebook 5.0.0
anaconda Command line client (version 1.6.0)
Operating System:

macOS High Sierra 10,13,2

conda info
Current conda install:

               platform : osx-64
          conda version : 4.3.30
       conda is private : False
      conda-env version : 4.3.30
    conda-build version : not installed
         python version : 2.7.13.final.0
       requests version : 2.12.4
       root environment : /Users/hal0taso/anaconda  (writable)
    default environment : /Users/hal0taso/anaconda
       envs directories : /Users/hal0taso/anaconda/envs
                          /Users/hal0taso/.conda/envs
          package cache : /Users/hal0taso/anaconda/pkgs
                          /Users/hal0taso/.conda/pkgs
           channel URLs : https://conda.anaconda.org/anaconda-fusion/osx-64
                          https://conda.anaconda.org/anaconda-fusion/noarch
                          https://repo.continuum.io/pkgs/main/osx-64
                          https://repo.continuum.io/pkgs/main/noarch
                          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/hal0taso/.condarc
             netrc file : None
           offline mode : False
             user-agent : conda/4.3.30 requests/2.12.4 CPython/2.7.13 Darwin/17.3.0 OSX/10.13.2    
                UID:GID : 501:20

I think we'd better add shebang like #!/bin/sh on first line.

@scarlet-ethan-lin
Copy link

@hal0taso I had the same issue on my macOS and I resolved it by adding the following line on the top of anaconda3/bin/jupyter_mac.command
#!/bin/bash
Hopefully this helps.

@hal0taso
Copy link
Author

@scarlet-ethan-lin Thank you for your reply! I already solved this issue, but I suggest to add shebang because Anaconda is a widely used project.

I think users should be able to use these useful tools without any consideration of what login shell they use. (It is true that users who change their login shell will can solve these trivial issue themselves, but it is little inconvenient.)

@BadToast
Copy link

@scarlet-ethan-lin @hal0taso I suggest updating the script as well. Otherwise you'll get warnings about your Anaconda/Notebook being corrupt because the hashes no longer match due to your changes:

SafetyError: The package for notebook located at /usr/local/anaconda3/pkgs/notebook-5.5.0-py36_0
appears to be corrupted. The path 'bin/jupyter_mac.command'
has a sha256 mismatch.
  reported sha256: b789fcb6f3945d0f70d23f6019032b7c0ffba1e95ba20e7b5559b1bb9f6b3fc3
  actual sha256: 43fe509899862737bd8f68541f4eb036092156a77da24517799fa0fa90b32924

@tina1998612
Copy link

Thank u so much @scarlet-ethan-lin !! Saved my day again

@kdeepak99
Copy link

Hey @scarlet-ethan-lin Thanks For your suggestion, But Please help me how to stop avoiding Terminal launch for each Startup of Jupiter-Note book

@elnemesisdivina
Copy link

thanks @scarlet-ethan-lin it works for me as well with this versions:
MAC mojave and conda version : 4.7.10, conda-build version : 3.18.8, python version : 3.7.3.final.0

@kdeepak99
Copy link

kdeepak99 commented Aug 25, 2019

Last login: Sun Aug 25 23:25:19 on ttys004

Guys I am Getting Below Error and unable to start Environment

Please Help Me.

/Users/DiPAK/.anaconda/navigator/a.tool ; exit;

~ » /Users/DiPAK/.anaconda/navigator/a.tool ; exit; 23:32:14
Failed to execute process '/Users/DiPAK/.anaconda/navigator/a.tool'. Reason:
exec: Exec format error
The file '/Users/DiPAK/.anaconda/navigator/a.tool' is marked as an executable but could not be run by the operating system.

[Process completed]

@RamboRogers
Copy link

Wish this were fixed. Still a problem in 2019, almost 2020 :-)

@enricobacis
Copy link

Officially a problem in 2020 :)

@pomelo
Copy link

pomelo commented May 15, 2020

Officially a problem in 2020 :)

Half way of 2020, still waiting :)

@lezhangnet
Copy link

Still an issue on Nov. 2020, with Anaconda Navigator 1.9.12 ::)

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

No branches or pull requests