dongsui5464
dongsui5464
2019-04-17 14:42

尝试安装gonum时如何处理“不允许导入周期”?

已采纳

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.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • dongyong1897 dongyong1897 2年前

    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.

    点赞 评论 复制链接分享

相关推荐