第一步:去https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/下载anaconda,注意不要下载miniconda,否则可能会报错,urbll3无法运行
第二步:更换pip的源,cmd中运行
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
第三步:打开官网https://pytorch.org/get-started/locally/
复制对应的pip命令,在Anaconda Prompt中运行,注意开启管理员运行。
第四步:打开pyg的官网下载https://data.pyg.org/whl/
选择自己对应的版本,
使用pip安装对应的四个文件
第五步:最后运行
pip install torch_geometric
安装可运行成功
总结:
第一个坑:安装了miniconda导致远程下载包文件失败
第二个坑:conda自动安装的是pytorch.2.1.0.dev版本,与对应的torch_geometric依赖包不兼容,导致torch_geometric无法运行,出现OSError: [WinError 127] 异常。
2023/9/2