Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在4090上安装失败 No module named 'mindspore._c_expression' #320

Open
HelloEveryonehh opened this issue Dec 13, 2024 · 2 comments
Open

Comments

@HelloEveryonehh
Copy link

Environment

Hardware Environment(Ascend/GPU/CPU):

Uncomment only one /device <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/device ascend

/device gpu

/device cpu

/device gpu

Software Environment:

  • MindSpore version (source or binary):master(Nightly build):
  • Python version (e.g., Python 3.7.5):3.9.11:
  • OS platform and distribution (e.g., Linux Ubuntu 16.04):ubuntu20.04:
  • GCC/Compiler version (if compiled from source):9.4.0:

Describe the current behavior

按照这个教程进行的安装https://www.mindspore.cn/install/#command,
CUDA本身是11.6,所以没进行cuda这一步,安装了cudnn
cudnn从官网下载cudnn-linux-x86_64-8.5.0.96_cuda11-archive.tar.xz
gcc也是自带的,所以没进行gcc安装这一步

Describe the expected behavior

在验证的时候出错

Steps to reproduce the issue

  1. python -c "import mindspore;mindspore.set_context(device_target='GPU');mindspore.run_check()"

Related log / screenshot

image

Special notes for this issue

@zhouyifeng888
Copy link

看这错误可能是有多个版本在环境里同时存在冲突了,Nightly 里面的是dev版本,包名是mindspore-dev,正式版是mindspore,所以安装其中一个前,先要手动把另一个卸载掉,也不能安装之后再卸载另一个,如果误操作两个都同时存在了,需要先把两个都卸载掉,然后再装那个你需要的,否则很可能会出错,上述错误就是个典型例子;
还有要注意,2.2.14是已发布的GPU正式版本,后续的2.3 2.4以及Nightly 里面的(没记错应该是已经2.5了),都是非正式版,可能有什么bug;且这几个非正式版可能需要设置一下环境变量:export CUDA_HOME=/cuda,CUDA_HOME的路径可以随便写一个,不设置的话可能无法运行;
如果是cuda环境搭建问题的话,其实建议可以先拉一个docker镜像直接运行,2.2.14的文档里有直接拉取cuda11.6的镜像运行的操作步骤,然后直接在里面装其它版本;
还有一点注意,4090显卡如果是cuda11.1的话,是没法跑起来的,11.6才行,有时候环境里有多个cuda版本,建议也可以排查一下

@zh9586
Copy link

zh9586 commented Dec 25, 2024

@HelloEveryonehh 你好,你的问题解决了吗?我也出现了相同的问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants