如何解决pytorch_geometric安装错误。未定义符号:_ZN5torch3jit17parseSchemaOrNameERKSs #999
解决方案:康达公司安装pyg -c -c pyg -c conda锻造
conda创建-n py38 pip
康达公司安装放火枪-c -c pyg -c conda锻件
康达安装pyg -c pyg -c conda -锻件
sudo apt安装libfreetype6-dev
pip安装-r requirements.txt
发布于 2022-01-27 22:45:01
也许在这里查一下:几何/问题/999
大多数人说,这是因为你是如何安装pytorch和两个版本的( cpu和gpu版本都是安装的)。
发布于 2022-09-28 06:07:11
我也有过类似的问题。正如在这个GitHub评论中提到的,当我们在系统中安装了不同的torch版本时,就会出现这个问题。这个问题发生在我的anaconda虚拟环境中,我安装在下面的路径中。
/home/anaconda3/envs/python-3.9
我按照以下步骤来解决这个问题。
步骤01:首先删除所有现有的火炬安装及其依赖项。
$ cd /home/anaconda3/envs/python-3.9/lib/python3.9/site-packages
$ rm -rf torch*
步骤02:重新安装特定的PyTorch版本和相关的依赖项,如下所示。
$ pip install torch -f https://data.pyg.org/whl/torch-<PYTORCH-VERSION>+<CPU|GPU>.html
$ pip install torch-geometric -f https://data.pyg.org/whl/torch-<PYTORCH-VERSION>+<CPU|GPU>.html
$ pip install torch-sparse -f https://data.pyg.org/whl/torch-<<PYTORCH-VERSION>+<CPU|GPU>.html
$ pip install torch-scatter -f https://data.pyg.org/whl/torch-<PYTORCH-VERSION>+<CPU|GPU>.html
确保根据您的需求和系统(CPU或GPU)安装PyTorch版本。例如,我安装了以下版本。
$ pip install torch -f https://data.pyg.org/whl/torch-1.12.1+cpu.html
$ pip install torch-geometric -f https://data.pyg.org/whl/torch-1.12.1+cpu.html
$ pip install torch-sparse -f https://data.pyg.org/whl/torch-1.12.1+cpu.html
$ pip install torch-scatter -f https://data.pyg.org/whl/torch-1.12.1+cpu.html
你可以找到所有的稳定的PyTorch版本。此外,现在您将能够看到在您的anaconda安装路径/home/anaconda3/envs/python-3.9/lib/python3.9/site-packages
中安装的包。
https://stackoverflow.com/questions/69952475
复制相似问题