Closed pepeballesterostel closed 1 month ago
Just the same for me
@RichestYoo I am pretty sure I have solved the problem adding this line of code:
os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
Let me know
@pepeballesterostel Where am I supposed to put that line in?
I put that in FaceBoxes/utils/build.py like the following failed: ext_modules = [ Extension( "nms.cpu_nms", ["nms/cpu_nms.pyx"], extra_compile_args=["-Wno-cpp", "-Wno-unused-function"], include_dirs=[numpy_include], os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE" ) ]
And "TRUE", instead of True seems to say that it's not a python source.
@RichestYoo Put it in the main script that you are running, for example singleImage.py. I added it after the imports. The command basically tells python that is ok to have multiple copies of the library MKL loaded into memory, which seems to be the initial compiling error.
@pepeballesterostel Thank you for your help, but it didn't work out for me. After first failure, I put that in the environment variable as "os.environ" is bringing/setting PC's environment variable, and tried again, but same error message came up.
@RichestYoo Try changing your code from build.py to this code: ext_modules = [ Extension( "nms.cpu_nms", ["nms/cpu_nms.pyx"],
extra_compile_args=['std=c99'],
include_dirs=[numpy_include]
)
] Does this work for you?
@pepeballesterostel With that, I passed the build failure you wrote at the beginning but now I'm at this "int_t" vs. 'long long' stuff...
@RichestYoo Those changes worked for me. I suggest you try to re-do the whole process installing everything into a separate conda environment.
@pepeballesterostel Sure. Thank you for your sincere helps.
@RichestYoo did you managed to get it working?
i have added extra_compile_args=['std=c99'],
to FaceBoxes build.py and os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
to singleImage.py butstuck at 'int_t' but got 'long long'
problem.
Thank you for your help, but I'm transferred to another job and is not working on this any more.
After trying a couple of times, I find impossible to correctly compile the file _./build_cpunms.sh. The error is:
I am not sure if this could be related to the operating system. I am running the code in Visual Studio Code on Windows 11.
Looking after the error I found this. So I changed in build.py inside FaceBoxes/utils the line of code 47: from
extra_compile_args=["-Wno-cpp", "-Wno-unused-function"]
toextra_compile_args={'gcc': ['/Qstd=c99']}
After running this, I get the following warnings:From where I assume that is basically not compiling the extra modules, but ignoring it. So, it does not show and error, but as expected, the code does not work. The error raises in _FaceBoxes\utils\nmswrapper.py :
I also tried commenting line 47 - in build.py inside FaceBoxes/utils - and uncommenting line 46, which raises the same error.
Any ideas how to solve this? Many thanks.