I'm currently trying to build detectron2 in environment in Anaconda. Below is the packages that I'm using in my env:
- windows 11
- conda package
- python 3.8
- cuda 11.3
- pytorch 1.11
- torchaudio 0.11.0
- torchvision 0.12.0
- ninja 1.10.2
- pybind11 2.10.4
I've cloned the git to my own directory so I was installing detectron2 with this command
python -m pip install -e detectron2
(detectron2 is the folder name for the cloned git)
But, I received this error while building detectron2 with setup.py
running develop
running egg_info
writing detectron2.egg-info\PKG-INFO
writing dependency_links to detectron2.egg-info\dependency_links.txt
writing requirements to detectron2.egg-info\requires.txt
writing top-level names to detectron2.egg-info\top_level.txt
reading manifest file 'detectron2.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'detectron2.egg-info\SOURCES.txt'
running build_ext
c:\conda\detect\lib\site-packages\setuptools\command\develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` and ``easy_install``.
Instead, use pypa/build, pypa/installer, pypa/build or
other standards-based tools.
See https://github.com/pypa/setuptools/issues/917 for details.
********************************************************************************
!!
easy_install.initialize_options(self)
c:\conda\detect\lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer, pypa/build or
other standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
self.initialize_options()
error: [WinError 2] The system cannot find the file specified
I've tried other method such as running:
python -m pip install .
while being in the cloned git path, but I kept getting the same error, which is The system cannot find the file specified while running build_ext.
Running
python setup.py build develop
also gave me the same error, which says:
running build
running build_py
running build_ext
error: [WinError 2] The system cannot find the file specified
I realized that this might be a problem with setuptools package. I've tried to update the package, downgrade my python to 3.7, downgrade my pytorch to 1.10, and add C++ compiler to my device Path, but the problem stays the same. Me and my mentor currently are running out of ideas. Perhaps anyone has any idea on how to solve this? I would appreciate your response. Thank you.