gopherdata / gophernotes

The Go kernel for Jupyter notebooks and nteract.
MIT License
3.8k stars 262 forks source link

Error: O.S. OSX gophernotes: No such file or directory/Users/PRC/go/bin/bin/gophernotes: No such file or directory #222

Closed ghost closed 3 years ago

ghost commented 3 years ago

While testing gophernotes executable...

/Users/PRC/go/bin/bin/gophernotes: No such file or directory

Issues during process installation...

$ env GO111MODULE=on go get github.com/gopherdata/gophernotes

OUTPUT ... go: github.com/gopherdata/gophernotes upgrade => v0.7.1 go/bin/pkg/mod/github.com/cosmos72/gomacro@v0.0.0-20200719111907-b07014b02196/imports/go1_10/archive_tar.go:10:2: package archive/tar is not in GOROOT (/Users/PRC/go/src/archive/tar) go/bin/pkg/mod/github.com/cosmos72/gomacro@v0.0.0-20200719111907-b07014b02196/imports/archive_zip.go:8:2: package archive/zip is not in GOROOT (/Users/PRC/go/src/archive/zip) go/bin/pkg/mod/github.com/cosmos72/gomacro@v0.0.0-20200719111907-b07014b02196/imports/bufio.go:8:2: package bufio is not in GOROOT (/Users/PRC/go/src/bufio) go/bin/pkg/mod/github.com/gopherdata/gophernotes@v0.7.1/display.go:4:2: package bytes is not in GOROOT (/Users/PRC/go/src/bytes)...

Settings.. GOROOT = /Users/PRC/go GOPATH = /Users/PRC/go/bin

Can you help me.

Thank you,

King regards

ghost commented 3 years ago

Captura de pantalla 2020-12-08 a las 11 55 47

ghost commented 3 years ago

Python version 3.7.2 Go version go1.15.6 darwin/amd64

ghost commented 3 years ago

go env

GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/Users/PRC/Library/Caches/go-build" GOENV="/Users/PRC/Library/Application Support/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/PRC/go/bin/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/PRC/go/bin" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/Users/PRC/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/Users/PRC/go/pkg/tool/darwin_amd64" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/c5/53f0q2vs5gs9s2qp99gwjszh0000gn/T/go-build079589874=/tmp/go-build -gno-record-gcc-switches -fno-common"

cosmos72 commented 3 years ago

Hello @PedroRCervera

in your setup GOROOT="/Users/PRC/go" - this seems to be the "/go" subdirectory inside your home directory. You really installed Go compiler there? Usually such directory is used for GOPATH, not for GOROOT

GOPATH = "/Users/PRC/go/bin" is inside GOROOT - if I remember correctly, that's strongly discouraged because it mixes Go compiler together with user code, causing a lot of strange effects.

To avoid difficult to diagnose problems, you'd better follow usual convention and defaults, using for example GOPATH = "/Users/PRC/go" - this is also assumed as default if you don't set GOPATH GOROOT = "/Users/PRC/gocompiler" or some other directory unrelated to GOPATH

Clearly, you will need to move (or reinstall) Go compiler to the new location

ghost commented 3 years ago

It works !!!

Thank you @cosmos72 !!!