簡體   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