Training error on custom image dataset
TypeError: int() argument must be a string, a bytes-like object, or a number, not 'NoneType'
Google is your friend.
The log show your code might look like int(None) .
After a successful training anaconda command prompt gave a warning
UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
which led to
ModuleNotFoundError: No module named 'yolox.layers.fast_cocoeval'
then finally, another error appeared
subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.
But in my standard windows cmd cl command shows no error; it is only in anaconda unable to locate the path.
Help how to add the path for the anaconda command prompt.
How do you solve it?
subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.
YOLOX Training Errors solution Command '['where', 'cl']' returned non-zero exit status 1
subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.
Solution: Compiler Warning: regarding cl (C/C++ compiler)
Download Visual Studio Build Tools https://visualstudio.microsoft.com/visual-cpp-build-tools/
while installation select desktop application C++ after installation CL file location "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe"
add the path to cl.exe to your PATH variable for the current session. Use the following command:
set PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64;%PATH%
if you want set in your custom conda env then fire above command in conda custom env console
Alternate option Navigate to your Conda environment directory:
C:\Users<YourUsername>\anaconda3\envs<your_env_name>\etc\conda\activate.d
create a new batch file named env_vars.bat
copy paste " @echo off
set PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64;%PATH%"
save and relaunch the your cusotm conda env console.
. then verify by fire CL command. it reflect result like this
cl Microsoft (R) C/C++ Optimizing Compiler Version 19.41.34123 for x64 Copyright (C) Microsoft Corporation. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]