我正在安装布局解析器并遵循此链接。使用以下软件包没有遇到任何问题。
pip install layoutparser
pip install "layoutparser[effdet]"
pip install layoutparser torchvision
pip install "layoutparser[paddledetection]"
pip install "layoutparser[ocr]"
但是我无法安装 detectorron2
pip install "git+https://github.com/facebookresearch/[email protected]#egg=detectron2"
安装此软件包时出现此错误
错误:找不到满足 detectorron2 要求的版本(不可用)(来自版本:无)
错误:未找到 detectorron2 的匹配分布(不可用)
我在 Google collab 中遵循了相同的安装指南,它可以工作,但无法将它们安装在我的 Azure 工作区中。
检查你的Python版本。如果您的 Python 版本为 3.10 或更高版本,您将面临此问题。这是因为 detectorron2 库只有 <= Python 3.9.
的轮子打开终端或命令提示符。 使用以下命令创建一个名为 detectorron2-env 的新环境:
conda create --name detectron2-env python==3.9 -y
使用以下命令激活环境:
conda activate detectron2-env
activate detectron2-env
使用以下命令安装依赖项:
pip3 install torch torchvision torchaudio
git clone https://github.com/facebookresearch/detectron2.git
python -m pip install -e detectron2
如需更多帮助,请参阅以下文档:
https://detectron2.readthedocs.io/en/latest/tutorials/install.html
在colab中,我使用:
!pip install -q torch torchvision --index-url https://download.pytorch.org/whl/cu118
!pip install -q 'git+https://github.com/facebookresearch/detectron2.git'
对于 Windows,有一个很棒的 conda 问题。