繁体   English   中英

在 virtualbox ubuntu 20.04 python 2.7 - '非法指令(核心转储)'上安装 tensorflow

[英]Installing tensorflow on virtualbox ubuntu 20.04 python 2.7 - 'Illegal instruction (core dumped)'

我的目标是遵循本指南,以便将 Caffe model 转换为 Tensorflow model。 As my original OS is Windows 10 I am using the virtual Ubuntu 20.04 (using Oracle VirtualBox) with python 2.7 and anaconda virtual env. 我能够成功地为 python 2.7 安装 tensorflow,但是当我运行命令python -c 'import tensorflow'时,我收到错误的文本Illegal instruction (core dumped) 我试图用谷歌搜索更多信息,但我得到的只是它可能与架构有关,我发现我的架构(在虚拟 ubuntu 上)是x86_64 这就是我所发现的,现在我转向 SO 询问我应该怎么做才能在上述环境中运行 tensorflow,非常感谢。

For those wondering, the pip or conda installation did not work in my case, so I followed the instructions on this guide for linux, python 2.7 using the pip installation method with a tensorflow version of 0.10, which for my purposes is good enough.

万一该链接将来不起作用的确切步骤:

  • $ conda create -n tensorflow python=2.7
  • $ conda activate tensorflow
  • 您的提示应更改为: (tensorflow)$
  • (tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl
  • (tensorflow)$ pip install --ignore-installed --upgrade $TF_BINARY_URL

如前所述,这适用于 python 2.7,但该指南也包含更新版本的信息。 要检查 tensorflow 是否安装正确,您可以运行此命令$ python -c 'import tensorflow as tf; print(tf.__version__)' $ python -c 'import tensorflow as tf; print(tf.__version__)'应该是 output 0.10.0

暂无
暂无

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

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