我想将tensorflow.js
用于浏览器。当我使用conda虚拟环境在系统(Windows 10 64位,Pycharm社区2019.1)上安装tf.js
时,发生以下错误:
(tjfs) A:\modakatech\tjfs>tensorflowjs_converter --version
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
ImportError: numpy.core.multiarray failed to import
The above exception was the direct cause of the following exception:
Traceback (most recent call last):File "<frozen importlib._bootstrap>",
line 980, in _find_and_load SystemError:
<class'_frozen_importlib._ModuleLockManager'> returned a result with an
error set ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
2019-06-03 10:49:29.186367: F tensorflow/python/lib/core/bfloat16.cc:675]
Check failed: PyBfloat16_Type.tp_base != nullptr
tensorflow.js
安装需要软件包numpy==1.15.1
,keras
等。
我试图将numpy
升级到最新版本,但是tensorflow.js
显示numpy
的版本应该是numpy==1.15.1
。我当前的numpy
版本是1.16,这是不兼容的。
Pycharm Error->ERROR: tensorflowjs 1.1.2 has requirement numpy==1.15.1, but you'll have
numpy 1.16.4 which is incompatible.
答案 0 :(得分:0)
您应该卸载numpy
pip uninstall numpy
并安装正确的版本
pip install numpy==1.15.1
编辑: 如果您使用的是conda-要卸载,请使用:
conda remove -n *your_env_name* numpy
要安装特定版本:
conda install -n *your_env_name* numpy=1.15.1