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

Unable to install #230

Closed
Karrq opened this issue Jun 23, 2019 · 7 comments
Closed

Unable to install #230

Karrq opened this issue Jun 23, 2019 · 7 comments

Comments

@Karrq
Copy link

Karrq commented Jun 23, 2019

Description

Unable to install the notebook using the zipped installer.

Repro steps

Please provide the steps required to reproduce the problem

  1. Unzip latest release

  2. Run ifsharp.exe

Expected behavior

Installation of notebook

Actual behavior

Unhandled Exception: System.Exception: Unable to start Jupyter, please install Jupyter and ensure it is on the path
   at IfSharp.Kernel.App.StartJupyter() in C:\dev\IfSharp\src\IfSharp.Kernel\App.fs:line 261
   at Program.main(String[] args) in C:\dev\IfSharp\src\IfSharp\Program.fs:line 29

Known workarounds

None

Related information

  • Win10
  • Last Release
  • .NET Runtime > 4.7.2

I made sure jupyter is on path. I can start it from the command prompt or from powershell and the folder where the executable sits at is in both the user's and the system's PATH.

@Karrq
Copy link
Author

Karrq commented Jun 24, 2019

After some more troubleshooting I was able to get IFSharp.exe to find jupyter by making a shortcut to the jupyter executable found in C:\\PythonInstallDir\\Scripts\\jupyter.exe in my user's home folder (C:\\Users\\MyUser). It then installed succesfully.

Upon trying to use the newly installed kernel with Jupyter Lab it seems to not work at all, making jupyter hang and throw a lot of errors in the web interface. Jupyter Notebook seems to work fine.

@cgravill
Copy link
Member

Strange, you shouldn't need to add that shortcut. Which Python distribution are you using?

The last zip release is from a while back. It's missing a fix for JupyterLab so you'd have to build from master yourself if you want to use JupyterLab for the moment.

@Karrq
Copy link
Author

Karrq commented Jun 24, 2019

I'm using Python 3.7.3 straight from the python software foundation (no Anaconda).

Good to know there's already a fix that's already done for the Lab incompatibility!

EDIT:
Also am I supposed to keep the installer and everything else in the same folder where I run IFSharp.exe the first time? I thought I could just delete those file after the first run...

@cgravill
Copy link
Member

Some folks have definitely been able to use a straight Python installer though I use Anaconda myself. It's fairly direct what it's doing:

let userDir = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
printfn "Starting Jupyter..."
let p = new Process()
p.StartInfo.FileName <- "jupyter"
p.StartInfo.Arguments <- "notebook"
p.StartInfo.WorkingDirectory <- userDir
// tell the user something bad happened
try
if p.Start() = false then failwith "Unable to start Jupyter, please install Jupyter and ensure it is on the path"
with _ -> failwith "Unable to start Jupyter, please install Jupyter and ensure it is on the path"

If you run a jupyter notebook on the default terminal, does it load? Are you able to create an F# notebook?

You only have to run the exe once, launching Jupyter is just a convenience that works for most folks.

On the second question: due to the way Jupyter works then you must keep the folder in the location you ran it from.

For example, I have a configuration file:
C:\Users\XYZUSER\AppData\Roaming\Jupyter\kernels\ifsharp\kernel.json

Which configures the location of kernel which Jupyter launches:

{
  "display_name": "F#",
  "argv": [ "E:\/dev\/IfSharp\/src\/IfSharp\/bin\/Debug\/ifsharp.exe", "{connection_file}"],
  "language": "fsharp"
}

There's a few discussions about how to make the installation process more comfortable e.g. #228

@Karrq
Copy link
Author

Karrq commented Jun 25, 2019

If you run a jupyter notebook on the default terminal, does it load?

Yes, I was able to run it straight from the terminal, that's how I usually start jupyter.

I followed the backtrace as well, that's also why I thought about making the shortcut in my home dir, since the working directory is set to that.

Thank you for answering my concern on the files after the install.

@cgravill
Copy link
Member

There might be more information on the exceptions, perhaps a permissions issue? So far we've not printed it out as it's always turned out to be a pathing issue that went away on reinstall.

If you were to build yourself could find if there's any additional information. We could possibly just print but for most people it might be confusing noise.

@cgravill
Copy link
Member

I'm going to close this for now, but if you get more information happy to look at it again later.

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

2 participants