Import third party packages on freebsd
zishucom opened this issue · 23 comments
i got flowing same error when i import any thirdpart package on jupyter notebook
error writing file "/projects/go/src/github.com/gopherdata/gophernotes/imports/thirdparty/github_com_nsf_gocode.go": open /projects/go/src/github.com/gopherdata/gophernotes/imports/thirdparty/github_com_nsf_gocode.go: no such file or directory
Can you copy here the output of go env
?
Thanks
dvma@dvma:~ % go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/dvma/.cache/go-build"
GOENV="/home/dvma/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="freebsd"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="freebsd"
GOPATH="/projects/go"
GOPRIVATE=""
GOPROXY="https://goproxy.io,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/freebsd_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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=/tmp/go-build944275286=/tmp/go-build -gno-record-gcc-switches"
Can you copy here the output of
go env
?Thanks
Hi Thank you
https://golang.org/doc/go1.14#plugin states that plugin support for freebsd/amd64 was added in Go 1.14
I will update gophernotes and use it for loading third party packages
https://golang.org/doc/go1.14#plugin states that plugin support for freebsd/amd64 was added in Go 1.14
I will update gophernotes and use it for loading third party packages
Thanks! Waiting that
Support for importing third party packages on freebsd added in commit 4ee426e
Requires Go >= 1.14
P.S.: github.com/nsf/gocode
does not seem to be an importable package.
Hi again! These errors still appeared there after I modified the go.mod go.sum and update the gomacro
In #214 you reported that you're still getting the same error:
i was upgraded the gomacro. and modified the go.mod and go.sum
import( "github.com/russross/blackfriday/v2" ) error writing file "/projects/go/src/github.com/gopherdata/gophernotes/imports/thirdparty /github_com_russross_blackfriday_v2.go": open /projects/go/src/github.com/gopherdata/gophernotes/imports/thirdparty/github_com_russross_blackfriday_v2.go: no such file or directory
Why did you "modify the go.mod go.sum and update the gomacro" ?
The installation instructions start with
env GO111MODULE=on go get github.com/gopherdata/gophernotes
and I thought you were doing that.
There is no need to modify gophernotes sources manually.
In #214 you reported that you're still getting the same error:
i was upgraded the gomacro. and modified the go.mod and go.sum
import( "github.com/russross/blackfriday/v2" ) error writing file "/projects/go/src/github.com/gopherdata/gophernotes/imports/thirdparty /github_com_russross_blackfriday_v2.go": open /projects/go/src/github.com/gopherdata/gophernotes/imports/thirdparty/github_com_russross_blackfriday_v2.go: no such file or directoryWhy did you "modify the go.mod go.sum and update the gomacro" ?
The installation instructions start with
env GO111MODULE=on go get github.com/gopherdata/gophernotesand I thought you were doing that.
There is no need to modify gophernotes sources manually.
Hi i reinstalled gophernotes.
cat pkg/mod/github.com/gopherdata/gophernotes@v0.7.0/go.mod
module github.com/gopherdata/gophernotes
go 1.11
require (
github.com/cosmos72/gomacro v0.0.0-20200226181501-ca599f547e70
github.com/go-zeromq/zmq4 v0.9.0
github.com/gofrs/uuid v3.2.0+incompatible
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
)
why is not
github.com/cosmos72/gomacro v0.0.0-20200719111907-b07014b02196
???
Good catch!
Then it means env GO111MODULE=on go get ...
does not download the latest commit of a module, but only the latest tagged commit, i.e. something like "latest released version".
I will release gophernotes 0.7.1 to let go get
pick it
[UPDATE] version 0.7.1 released.
Please try again the command
env GO111MODULE=on go get github.com/gopherdata/gophernotes
Thanks! But there gets new error:
import(
"github.com/360EntSecGroup-Skylar/excelize/"
)
error loading package "github.com/360EntSecGroup-Skylar/excelize/" metadata: packages.Load() could not find package "github.com/360EntSecGroup-Skylar/excelize/"
#ls src/gomacro.imports/github.com/
360EntSecGroup-Skylar
And sure the package was installed in pkg
Try removing the final slash, i.e.
import "github.com/360EntSecGroup-Skylar/excelize"
instead of
import "github.com/360EntSecGroup-Skylar/excelize/" /* note the extra '/' at the end */
That's really strange.
Can you import any package at all? For example,
import "gonum.org/v1/gonum/floats"
That's really strange.
Can you import any package at all? For example,
import "gonum.org/v1/gonum/floats"
Same last error here after I installed this package
Can you post the error (or a screenshot) you get with the following import?
import "gonum.org/v1/gonum/floats"
By mistake I wrote "gonum.org/v1/floats" and you tried before I corrected the path
One more thing: usually there is no need to install packages before importing them.
ok, then you must have some leftovers from old installations lying around.
You can try with a cleanup:
go clean
go clean -cache
go clean -modcache
then reinstall gophernotes from scratch following the Linux instructions which should work also for FreeBSD.
ok, then you must have some leftovers from old installations lying around.
You can try with a cleanup:
go clean go clean -cache go clean -modcachethen reinstall gophernotes from scratch following the Linux instructions which should work also for FreeBSD.
thank you verymuch cosmos72 it's working now...