我正在尝试安装 pytorch3d,但 conda 或 pip 都找不到 pytorch3d 包。
我按照pytorch说明进行操作:https://github.com/facebookresearch/pytorch3d/blob/main/INSTALL.md
可以通过运行安装运行时依赖项:
conda create -n pytorch3d python=3.9
conda activate pytorch3d
conda install pytorch=1.13.0 torchvision pytorch-cuda=11.8 -c pytorch -c nvidia
conda install -c fvcore -c iopath -c conda-forge fvcore iopath
对于 CUB 构建时间依赖项,只有当您的 CUDA 版本早于 11.7 时才需要(我有 CUDA 12),如果您使用的是 conda,则可以继续
conda install -c bottler nvidiacub
蟒蛇云
conda install pytorch3d -c pytorch3d
我收到错误:
PackagesNotFoundError: The following packages are not available from current channels:
- pytorch3d
当我跑步时:
pip install pytorch3d
我收到此错误:
ERROR: Could not find a version that satisfies the requirement pytorch3d (from versions: none)
ERROR: No matching distribution found for pytorch3d
您在所关注的文档中遗漏了一些内容。请注意,在 Installing prebuilt binaries for PyTorch3D 下有 Install with CUDA support from Anaconda Cloud, on Linux,因此仅在 Linux 上支持使用 conda 安装。如果您在 anaconda.org 上搜索并检查页面,您也可以看到这一点 https://anaconda.org/pytorch3d/pytorch3d:
注意它如何只有 linux-x64 标签
对于
pip
,我们可以在这里查看PyPi上的可用文件:
请注意,只有 macOS 文件。
总结一下:Windows 上都不支持您的安装方法。您需要从源代码安装。
这样做的主要命令是
pip install "git+https://github.com/facebookresearch/pytorch3d.git@stable"