mindspore-ai / mindspore

MindSpore is a new open source deep learning training/inference framework that could be used for mobile, edge and cloud scenarios.
https://gitee.com/mindspore/mindspore
Apache License 2.0
4.16k stars 686 forks source link

No module named 'mindspore._c_expression' when trying to import Mindspore #247

Open finnnnnnnnnnnnnnnnn opened 8 months ago

finnnnnnnnnnnnnnnnn commented 8 months ago

Environment

Hardware Environment(Ascend/GPU/CPU):

/device cpu

Software Environment:

Describe the current behavior

When attemping to import Mindspore this error occurs: ModuleNotFoundError: No module named 'mindspore._c_expression'

Describe the expected behavior

This error should not occur and Mindspore should import correctly

Steps to reproduce the issue

  1. Install Mindspore 1.5.2
  2. Run python -c 'import mindspore'

Related log / screenshot

Full error:

  File "<string>", line 1, in <module>
  File "/Users/user/.pyenv/versions/MTFN3.7.17/lib/python3.7/site-packages/mindspore/__init__.py", line 18, in <module>
    from . import common, train, log
  File "/Users/user/.pyenv/versions/MTFN3.7.17/lib/python3.7/site-packages/mindspore/common/__init__.py", line 16, in <module>
    from . import dtype
  File "/Users/user/.pyenv/versions/MTFN3.7.17/lib/python3.7/site-packages/mindspore/common/dtype.py", line 20, in <module>
    from .._c_expression import typing, EnvInstance_
ModuleNotFoundError: No module named 'mindspore._c_expression'

Special notes for this issue

cxl-ll commented 7 months ago

Hello, welcome to MindSpore. It is recommended that you try to install the latest version of MindSpore.Try to see if there's the same problem. https://www.mindspore.cn/install