Skip to content
Snippets Groups Projects
Commit 5a0905b3 authored by Yen-Chen Lin's avatar Yen-Chen Lin
Browse files

Use subprocess to install detectron2

parent 2292fe94
No related branches found
No related tags found
No related merge requests found
......@@ -397,7 +397,9 @@ if __name__ == "__main__":
import detectron2
except ModuleNotFoundError:
input("Detectron2 is not installed. Press enter to install it.")
os.system("python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'")
import subprocess
package = 'git+https://github.com/facebookresearch/detectron2.git'
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
import detectron2
import torch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment