0

I'd like to use the gonum libraries for go in order to experiment with some neural network stuff but I cannot go past the install process...

I'm running the command found on the official gonum website :

go get -u -t gonum.org/v1/gonum/...

But it gives me :

import cycle not allowed
package gonum.org/v1/gonum
    imports runtime
    imports internal/bytealg
    imports internal/cpu
    imports runtime

Do you know what could be a reason for such a problem?

In case you need my go env in order to help me out, here it is :

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/me/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

I'm running go 1.6.2.

some_other_guy
  • 3,364
  • 4
  • 37
  • 55
Vylly
  • 13
  • 3
  • 2
    Per the README, "Gonum supports and tests on the three most recent minor versions of Go." The current release is 1.12 so you may run into issues with versions older than 1.10, which you are far behind. Try updating Go and see if that helps. – Adrian Apr 17 '19 at 15:05
  • 1
    Thanks a lot, your comment made me realize the issue : I had the package go-golang installed (from apt-get ) and it was used instead of the released version I got from the go website so I was using an old version of go which didn't allow me to import gonum. I just had to remove the go-golang package to make it work (I also took the time to upgrade the go version I was using). Thanks a lot @Adrian ! – Vylly Apr 17 '19 at 15:24

1 Answers1

1

As Adrian told in the comments, the issue was that the go version I was running was too old for gonum to install correctly. This was due to the fact that the go-golang package installed on my computer via apt-get was giving me the 1.6 version of go. By removing the package and making sure I had a recent go release installed on my computer I managed to install gonum.

Vylly
  • 13
  • 3