У меня есть новый env в conda, и если после активации env я выполню следующую команду, она будет успешной:
python -c "import tf2onnx"
Но, если я выполню ту же команду (после активации env) на ноутбуке Jupyter, я получу следующую ошибку:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-3-9d842ab860c9> in <module>
----> 1 import tf2onnx
C:\Miniconda3\envs\tf\lib\site-packages\keras2onnx\ktf2onnx\tf2onnx\__init__.py in <module>
11 from .version import version as __version__
12 from . import logging
---> 13 from tf2onnx import tfonnx, utils, graph, graph_matcher, shape_inference, schemas # pylint: disable=wrong-import-order
C:\Miniconda3\envs\tf\lib\site-packages\keras2onnx\ktf2onnx\tf2onnx\tfonnx.py in <module>
23 import tf2onnx.onnx_opset # pylint: disable=unused-import
24 import tf2onnx.custom_opsets # pylint: disable=unused-import
---> 25 from tf2onnx.graph import Graph
26 from tf2onnx.graph_matcher import OpTypePattern, GraphMatcher
27 from tf2onnx.rewriter import * # pylint: disable=wildcard-import
C:\Miniconda3\envs\tf\lib\site-packages\keras2onnx\ktf2onnx\tf2onnx\graph.py in <module>
19
20 from distutils.version import StrictVersion
---> 21 from onnx import helper, numpy_helper, shape_inference, OperatorSetIdProto, AttributeProto, version
22 from tf2onnx import utils, __version__
23 from tf2onnx.utils import port_name, find_opset
ImportError: cannot import name 'shape_inference'
В чем разница между выполнением этой команды с или без jupyter, которая вызывает эту ошибку?
Заранее спасибо