简体   繁体   English

无法导入 torch_geometric,它说“未定义的符号:_ZN5torch3jit17parseSchemaOrNameERKSs”

[英]Could not import torch_geometric, it says "undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs"

I am trying to find a solution to the error: OSError: /opt/conda/lib/python3.7/site-packages/torch_sparse/_version_cuda.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs .我正在尝试找到错误的解决方案: OSError: /opt/conda/lib/python3.7/site-packages/torch_sparse/_version_cuda.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs

arising from the statement from torch_geometric.data import Data in Kaggle notebook. from torch_geometric.data import Data在 Kaggle notebook 中的声明。

There are solutions in github and stackoverflow , but none are working. githubstackoverflow中有解决方案,但都没有用。

-- "nvcc --version" shows -- "nvcc --version" 显示

"nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2020 NVIDIA Corporation Built on Wed_Jul_22_19:09:09_PDT_2020 Cuda compilation tools, release 11.0, V11.0.221 Build cuda_11.0_bu.TC445_37.28845127_0" “nvcc:NVIDIA (R) Cuda 编译器驱动程序 版权所有 (c) 2005-2020 NVIDIA Corporation Built on Wed_Jul_22_19:09:09_PDT_2020 Cuda 编译工具,版本 11.0,V11.0.221 Build cuda_11.0_bu.TC445_372.27804”5

I tried to install torch-geometric by我尝试通过以下方式安装 torch-geometric

  1. !conda install pyg -c pyg -c conda-forge !conda 安装 pyg -c pyg -c conda-forge

  2. !pip install pyg-lib torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.12.0+cu113.html !pip 安装 pyg-lib torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.12.0+cu113.html

from here .这里

The first statement took more than 1 hour so I moved to the second, which installed it.第一个声明花了 1 个多小时,所以我转到第二个,安装了它。 But the error didn't go.但是错误并没有go。

It is running with out any error in colab.它在 colab 中运行时没有任何错误。

This issue is mentionned at https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html :https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html中提到了这个问题:

undefined symbol: make_function_schema : This issue signals (1) a version conflict between your installed PyTorch version and the ${TORCH} version specified to install the extension packages, or (2) a version conflict between the installed CUDA version of PyTorch and the ${CUDA} version specified to install the extension packages. undefined symbol: make_function_schema :此问题表示 (1) 安装的 PyTorch 版本与指定用于安装扩展包的 ${TORCH} 版本之间存在版本冲突,或者 (2) 安装的 CUDA 版本的 PyTorch 与 ${TORCH} 版本之间存在版本冲突{CUDA} 指定安装扩展包的版本。 Please verify that your PyTorch version and its CUDA version match with your installation command:请验证您的 PyTorch 版本及其 CUDA 版本是否与您的安装命令匹配:

python -c "import torch; print(torch.__version__)"
python -c "import torch; print(torch.version.cuda)"
nvcc --version

For re-installation, ensure that you do not run into any caching issues by using the pip --force-reinstall --no-cache-dir flags.对于重新安装,请使用 pip --force-reinstall --no-cache-dir 标志确保您不会遇到任何缓存问题。 In addition, the pip --verbose option may help to track down any issues during installation.此外,pip --verbose 选项可能有助于追踪安装期间的任何问题。 If you still do not find any success in installation, please try to install the extension packages from source.如果您仍然没有发现安装成功,请尝试从源安装扩展包。

So, I would try these commands, and re-install all or part of the packages into a fresh environment.因此,我会尝试这些命令,并将所有或部分软件包重新安装到新环境中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Kaggle内核中,当检查torch.cuda.is_available()时选择了GPU选项时,它说不可用 - In a Kaggle kernel while having selected the GPU option when checking torch.cuda.is_available(), it says is not available 如何将数据集下载到 Colab 中? 遇到问题,显示“401 - 未经授权”? - How to download data set into Colab? Stuck with a problem, it says “401 - Unauthorized”? ValueError:无法将字符串转换为浮点数:&#39;horse&#39; - ValueError: could not convert string to float: 'horse' ValueError:无法将字符串转换为浮点数:'。'。对于 Glove 数据集 - ValueError: could not convert string to float: '.' .For Glove dataset 解析错误(文本 = x,srcfile = src):<text> :13:6: 意外符号 12:13: 这个 R ^ - Error in parse(text = x, srcfile = src): <text>:13:6: unexpected symbol 12: 13: This R ^ eval中的错误(expr,envir,enclos):找不到函数“eval” - Error in eval(expr, envir, enclos) : could not find function “eval” 为什么 u-net 可以用较小的掩码掩码图像? - Why could u-net mask image with smaller mask? train.default(x,y,weights = w,...)出错:无法确定最终调整参数 - Error in train.default(x, y, weights = w, …) : final tuning parameters could not be determined 为什么导入 cugraph 在 kaggle 中不起作用? - why import cugraph not working in kaggle? 将 CSV 数据导入 Google 表格 - Import CSV data into Google Sheets
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM