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

Function to locate jupyter.exe in local MiniConda folder fails in Windows #352

Closed
kobussch opened this issue Oct 6, 2019 · 2 comments
Closed
Labels

Comments

@kobussch
Copy link
Contributor

kobussch commented Oct 6, 2019

The bug

If the user does not manually add the path to jupyter.exe in the environmental variables, the find_jupyter_cmd() function fails to find jupyter

Context

The error can be induced as follows:
With REPL closed, make sure that jupyter.exe is not in either the system or user environmental PATH variables. Then open REPL and enter the following lines:

julia> using IJulia,WebIO
julia> WebIO.find_jupyter_cmd()
┌ Error: Unable to find a jupyter executable after searching PATH and Conda.jl.
│   PATH = "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;....;C:\\Users\\ks\\AppData\\Roaming\\IntraWeb XIV\\bin;C:\\Program Files\\7-Zip;"
│   conda_root = "C:\\Users\\ks\\.julia\\conda\\3"
└ @ WebIO C:\Users\ks\.julia\packages\WebIO\9qsL8\deps\jupyter.jl:111
ERROR: Could not find the Jupyter executable.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] find_jupyter_cmd() at C:\Users\ks\.julia\packages\WebIO\9qsL8\deps\jupyter.jl:115
 [3] top-level scope at none:0

For brevity most of the returned PATH string has been removed in the quoted text because it is irrelevant to this problem.

This problem error has been tested on Windows 7 and Windows 10 and on Julia versions 1.1.0, 1.2.0 and 1.3.0-rc2.0, all with fresh installs of Julia, IJulia and PlotlyJS, followed by running notebook() from the REPL and allowing a local install of MiniConda

WebIO version is v0.8.11

The problem is probably the following line in deps\jupyter.jl in the WebIO package. This is line 107:

jupyter = joinpath(conda_root, "bin", "jupyter")

Changing this line to

jupyter = joinpath(conda_root, "Scripts", "jupyter.exe")

solved the problem. There is no bin folder in the MiniConda distribution on Windows for any of the installations tested and the .exe suffix is needed for a successful find.

This issue may be related to #342

@twavv
Copy link
Member

twavv commented Oct 8, 2019

Thanks for detailed issue. I don't have a Windows machine so I'd love if you took a stab at a PR. 😄

@twavv twavv added the bug label Oct 8, 2019
@twavv
Copy link
Member

twavv commented Oct 24, 2019

Closed by #354.

@twavv twavv closed this as completed Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants