英文:
How to install Detectron2
问题
以下是翻译好的内容:
I am installing layout-parser and following this link. Did not face any issues with the following packages.
pip install layoutparser
pip install "layoutparser[effdet]"
pip install layoutparser torchvision
pip install "layoutparser[paddledetection]"
pip install "layoutparser[ocr]"
But I am not able to install detectron2
pip install "git+https://github.com/facebookresearch/detectron2.git@v0.5#egg=detectron2"
while installing this package I am getting this error
ERROR: Could not find a version that satisfies the requirement detectron2 (unavailable) (from versions: none)
ERROR: No matching distribution found for detectron2 (unavailable)
I followed the same installation guide in Google Colab and it worked but not able to install them in my Azure workspace.
英文:
I am installing layout-parser and following this link. Did not face any issues with the following packages.
pip install layoutparser
pip install "layoutparser[effdet]"
pip install layoutparser torchvision 
pip install "layoutparser[paddledetection]"
pip install "layoutparser[ocr]" 
But I am not able to install detectron2
pip install "git+https://github.com/facebookresearch/detectron2.git@v0.5#egg=detectron2" 
while installing this package I am getting this error
> ERROR: Could not find a version that satisfies the requirement detectron2 (unavailable) (from versions: none)
>
> ERROR: No matching distribution found for detectron2 (unavailable)
I followed the same installation guide in Google collab and it worked but not able to install them in my Azure workspace.
答案1
得分: 3
检查您的Python版本。如果您的Python版本为3.10或更高,您将遇到此问题。这是因为detectron2库只支持Python 3.9或更低版本。
英文:
Check your python version. If you have Python version as 3.10 or higher you will face this issue. This is because detectron2 library has only wheels for <= Python 3.9.
答案2
得分: 2
- 打开终端或命令提示符。
- 使用以下命令创建一个名为detectron2-env的新环境:
conda create --name detectron2-env python==3.9 -y
- 使用以下命令激活环境:
Linux
conda activate detectron2-env
Windows
activate detectron2-env
- 使用以下命令安装依赖项:
pip3 install torch torchvision torchaudio
git克隆https://github.com/facebookresearch/detectron2.git
python -m pip install -e detectron2
有关更多帮助,请参考以下文档:
https://detectron2.readthedocs.io/en/latest/tutorials/install.html
英文:
Open a terminal or command prompt.
Create a new environment called detectron2-env with the following command:
conda create --name detectron2-env python==3.9 -y
Activate the environment with the following command:
Linux
conda activate detectron2-env
Windows
activate detectron2-env
Install the dependencies with the following commands:
pip3 install torch torchvision torchaudio
git clone https://github.com/facebookresearch/detectron2.git
python -m pip install -e detectron2
For more help, please refer to the following documentation:
https://detectron2.readthedocs.io/en/latest/tutorials/install.html
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论