简体   繁体   English

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

[英]How to deal with “import cycle not allowed” while trying to install 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... 我想使用gonum库去尝试一些神经网络的东西,但我不能超越安装过程...

I'm running the command found on the official gonum website : 我正在运行在gonum官方网站上找到的命令:

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.6.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. 正如Adrian在评论中告诉的那样,问题在于我运行的go版本太旧,无法正确安装gonum。 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. 这是由于以下事实:通过apt-get安装在我的计算机上的go-golang软件包为我提供了1.6版本的go。 By removing the package and making sure I had a recent go release installed on my computer I managed to install gonum. 通过删除软件包并确保我的计算机上安装了最新的go版本,我设法安装了gonum。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM