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

Cannot find file "topfind" #61

Open
cprieto opened this issue Apr 25, 2017 · 2 comments
Open

Cannot find file "topfind" #61

cprieto opened this issue Apr 25, 2017 · 2 comments

Comments

@cprieto
Copy link

cprieto commented Apr 25, 2017

I am learning OCaml right now and using a Python notebook for that is awesome, thanks iocaml exists!, so if I am doing something stupid please tell me...

Installed a new ocaml/opam installation, created a new switch for iocaml:

opam switch -A 4.03.0 iocaml
eval `opam config env`
opam install iocaml
opam install core

To make sure everything is ok, I created a new virtualenv for Python and installed the supported IPython:

mkvirtualenv iocaml && pip install 'ipython[all]==1.1.0'

Followed the instructions at the wiki and tried the new kernel:

ipython notebook --profile=iocaml

It runs, it highlights, it evaluates my expressions, nice. Now, it doesn't load/require/use core or anything, so #use "topfind" results in 'File not found' error, so #require "core" is not going to work because #require is not recognised and open Core.Std is unbound...

Yes, I created an ~/.iocamlinit file as suggested by #14 and it looks pretty much like this:

(* Added by OPAM. *)
let () =
  try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
    with Not_found -> ()
    ;;
#use "topfind";;
#thread;;
#camlp4o;;

and no, it is not working.

What am I doing wrong?

@andrewray
Copy link
Owner

andrewray commented Apr 25, 2017 via email

@cprieto
Copy link
Author

cprieto commented Apr 25, 2017

iocaml notebook worked like a charm, though let () = Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") doesn't because for some reason they cannot see the environment variable (and I actually tried setting it up manually, but no luck).

I was following the instructions in the wiki, do you still need to install IPython then?

I will need to update the instructions in the Wiki, I was following them line by line 😞

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

No branches or pull requests

2 participants