gopherdata / gophernotes

The Go kernel for Jupyter notebooks and nteract.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to run notebook with error: packages.Load() could not find package

kortschak opened this issue · comments

Gophernotes looks like it's failing again for me. Attempting to run the notebook at https://mybinder.org/v2/gh/kortschak/graphprac/master?filepath=graph-prac.ipynb gives the following (Go1.13).

error loading package "github.com/kortschak/graphprac" metadata: packages.Load() could not find package "github.com/kortschak/graphprac"

I get this error when running locally (Go1.15).

error loading package "github.com/kortschak/graphprac" metadata: -: cannot find module providing package github.com/kortschak/graphprac: working directory is not part of a module

I don't know if this is related to #184, but the local error suggests so.

I have just reinstalled gophernotes locally with version v0.7.1 and it is working locally, so this issue becomes a question about what it is that I'm doing wrong in the postBuild on the MyBinder configuration. I'll have a little play to see if I can fix that.

Resolved with some care given to the postBuild.

Good to hear that you solved this problem.

Would you care to post the differences between the 'broken' and the 'working' build script ?

Or maybe the critical parts were the following?

export GO111MODULE=on
# ...
go get github.com/gopherdata/gophernotes@v0.7.1

The change that fixed the problem was this. Within that mess, I'd say the crucial lines are ones that you mentioned and then copying and replacing the kernel.json to include the $GOROOT and updated $PATH that otherwise lacks the go tool.