簡體   English   中英

嘗試安裝 tensorflow 時缺少 numpy 庫

[英]Missing numpy lib when trying to install tensorflow

如圖所示,我安裝了 numpy。 我正在使用 M1 芯片的說明
https://developer.apple.com/metal/tensorflow-plugin/

(base) cody@Codys-MBP ~ % pip install numpy --upgrade --force-reinstall
Defaulting to user installation because normal site-packages is not writeable
Collecting numpy
  Using cached numpy-1.23.5-cp39-cp39-macosx_11_0_arm64.whl (13.4 MB)
Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 1.23.5
    Uninstalling numpy-1.23.5:
      Successfully uninstalled numpy-1.23.5
  WARNING: The scripts f2py, f2py3 and f2py3.9 are installed in '/Users/cody/Library/Python/3.9/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed numpy-1.23.5
(base) cody@Codys-MBP ~ % python3 -c "import tensorflow as tf;"
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import

這是一個 numpy 版本問題。 我卸載了所有東西,然后讓張量流解決它的依賴。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM