Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

train.py failed #659

Open
asd13723654042 opened this issue Jul 16, 2024 · 0 comments
Open

train.py failed #659

asd13723654042 opened this issue Jul 16, 2024 · 0 comments

Comments

@asd13723654042
Copy link

当我尝试运行train.py时出现Traceback (most recent call last):
File "D:\Anaconda\envs\yolo8\yolov5_obb-master\train.py", line 34, in
import val # for end-of-epoch mAP
File "D:\Anaconda\envs\yolo8\yolov5_obb-master\val.py", line 20, in
from utils.rboxs_utils import poly2hbb, rbox2poly
File "D:\Anaconda\envs\yolo8\yolov5_obb-master\utils_init_.py", line 14, in
from utils.general import colorstr, emojis
File "D:\Anaconda\envs\yolo8\yolov5_obb-master\utils\general.py", line 35, in
from utils.nms_rotated import obb_nms
File "D:\Anaconda\envs\yolo8\yolov5_obb-master\utils\nms_rotated_init_.py", line 1, in
from .nms_rotated_wrapper import obb_nms, poly_nms
File "D:\Anaconda\envs\yolo8\yolov5_obb-master\utils\nms_rotated\nms_rotated_wrapper.py", line 4, in
from . import nms_rotated_ext
ImportError: cannot import name 'nms_rotated_ext' from partially initialized module 'utils.nms_rotated' (most likely due to a circular import) (D:\Anaconda\envs\yolo8\yolov5_obb-master\utils\nms_rotated_init_.py)
而且在配置环境的步骤python steup.py develop时也有如下报错
running develop
D:\Anaconda\envs\yolo8\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 or other
    standards-based tools.

    See https://github.com/pypa/setuptools/issues/917 for details.
    ********************************************************************************

!!
easy_install.initialize_options(self)
D:\Anaconda\envs\yolo8\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 or other
    standards-based tools.

    See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
    ********************************************************************************

!!
self.initialize_options()
running egg_info
creating nms_rotated.egg-info
writing nms_rotated.egg-info\PKG-INFO
writing dependency_links to nms_rotated.egg-info\dependency_links.txt
writing top-level names to nms_rotated.egg-info\top_level.txt
writing manifest file 'nms_rotated.egg-info\SOURCES.txt'
D:\Anaconda\envs\yolo8\lib\site-packages\torch\utils\cpp_extension.py:499: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'nms_rotated.egg-info\SOURCES.txt'
writing manifest file 'nms_rotated.egg-info\SOURCES.txt'
running build_ext
D:\Anaconda\envs\yolo8\lib\site-packages\torch\utils\cpp_extension.py:384: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
building '.nms_rotated_ext' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
(yolo8) PS D:\Anaconda\envs\yolo8\yolov5_obb-master\utils\nms_rotated> python setup.py develop
running develop
D:\Anaconda\envs\yolo8\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 or other
    standards-based tools.

    See https://github.com/pypa/setuptools/issues/917 for details.
    ********************************************************************************

!!
easy_install.initialize_options(self)
D:\Anaconda\envs\yolo8\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 or other
    standards-based tools.

    See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
    ********************************************************************************

!!
self.initialize_options()
running egg_info
writing nms_rotated.egg-info\PKG-INFO
writing dependency_links to nms_rotated.egg-info\dependency_links.txt
writing top-level names to nms_rotated.egg-info\top_level.txt
D:\Anaconda\envs\yolo8\lib\site-packages\torch\utils\cpp_extension.py:499: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'nms_rotated.egg-info\SOURCES.txt'
writing manifest file 'nms_rotated.egg-info\SOURCES.txt'
running build_ext
D:\Anaconda\envs\yolo8\lib\site-packages\torch\utils\cpp_extension.py:384: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
building '.nms_rotated_ext' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
(yolo8) PS D:\Anaconda\envs\yolo8\yolov5_obb-master\utils\nms_rotated> python setup.py develop
running develop
D:\Anaconda\envs\yolo8\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 or other
    standards-based tools.

    See https://github.com/pypa/setuptools/issues/917 for details.
    ********************************************************************************

!!
easy_install.initialize_options(self)
D:\Anaconda\envs\yolo8\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 or other
    standards-based tools.

    See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
    ********************************************************************************

!!
self.initialize_options()
running egg_info
writing nms_rotated.egg-info\PKG-INFO
writing dependency_links to nms_rotated.egg-info\dependency_links.txt
writing top-level names to nms_rotated.egg-info\top_level.txt
D:\Anaconda\envs\yolo8\lib\site-packages\torch\utils\cpp_extension.py:499: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'nms_rotated.egg-info\SOURCES.txt'
writing manifest file 'nms_rotated.egg-info\SOURCES.txt'
running build_ext
D:\Anaconda\envs\yolo8\lib\site-packages\torch\utils\cpp_extension.py:384: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
building '.nms_rotated_ext' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant