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

can't run setup.py #471

Open
omarkshoaib opened this issue May 15, 2024 · 1 comment
Open

can't run setup.py #471

omarkshoaib opened this issue May 15, 2024 · 1 comment

Comments

@omarkshoaib
Copy link

I am trying to run this project for building a exercise assistant project, and i am following the instructions in the getting started file but with the change of the versions and the dependencies

here are the commands i run to start the project

conda create -n mmskeleton_2 python=3.7 -y

conda activate mmskeleton_2

pip install torch==1.13.0+cu117 torchvision -f https://download.pytorch.org/whl/torch_stable.html --no-cache-dir

pip install -U openmim
mim install mmcv-full==1.7.2

conda install cython

conda install ninja

conda install -c conda-forge pycocotools

pip install lazy_import

PyTorch Version: 1.13.0+cu117
CUDA Available: True
CUDA Version: 11.7
CUDA Device Name: NVIDIA GeForce GTX 1650 Ti

i installed this version (mim install mmcv-full==1.7.2)because when i tried to install the latest version mmcv kept on crashing and i had to change the whole project to mmengine

here is the error that appears when i run setup.py:

(mmskeleton_2) PS F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton> python setup.py develop
E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools_init_.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

    ********************************************************************************
    Requirements should be satisfied by a PEP 517 installer.
    If you are using pip, you can try `pip install --use-pep517`.
    ********************************************************************************

!!
dist.fetch_build_eggs(dist.setup_requires)
E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools\dist.py:510: InformationOnly: Normalizing '0.7.rc1+b4c076b' to '0.7rc1+b4c076b'
self._validate_version(self.metadata.version)
running develop
E:\ANACONDA\envs\mmskeleton_2\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)
E:\ANACONDA\envs\mmskeleton_2\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 mmskeleton.egg-info\PKG-INFO
writing dependency_links to mmskeleton.egg-info\dependency_links.txt
writing requirements to mmskeleton.egg-info\requires.txt
writing top-level names to mmskeleton.egg-info\top_level.txt
reading manifest file 'mmskeleton.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'mmskeleton.egg-info\SOURCES.txt'
running build_ext
E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\utils\cpp_extension.py:358: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
building 'mmskeleton.ops.nms.cpu_nms' extension
Emitting ninja build file F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\build\temp.win-amd64-cpython-37\Release\build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:E:\ANACONDA\envs\mmskeleton_2\libs /LIBPATH:E:\ANACONDA\envs\mmskeleton_2 /LIBPATH:E:\ANACONDA\envs\mmskeleton_2\PCbuild\amd64 "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64" /EXPORT:PyInit_cpu_nms "F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\build\temp.win-amd64-cpython-37\Release\mmskeleton\ops\nms\cpu_nms.obj" /OUT:build\lib.win-amd64-cpython-37\mmskeleton\ops\nms\cpu_nms.cp37-win_amd64.pyd "/IMPLIB:F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\build\temp.win-amd64-cpython-37\Release\mmskeleton\ops\nms\cpu_nms.cp37-win_amd64.lib"
Creating library F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\build\temp.win-amd64-cpython-37\Release\mmskeleton\ops\nms\cpu_nms.cp37-win_amd64.lib and object F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\build\temp.win-amd64-cpython-37\Release\mmskeleton\ops\nms\cpu_nms.cp37-win_amd64.exp
Generating code
Finished generating code
building 'mmskeleton.ops.nms.gpu_nms' extension
Emitting ninja build file F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\build\temp.win-amd64-cpython-37\Release\build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] cl /showIncludes /nologo /O2 /W3 /GL /DNDEBUG /MD /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -DWITH_CUDA -Immskeleton\ops\nms -IE:\ANACONDA\envs\mmskeleton_2\lib\site-packages\numpy\core\include -IE:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\include -IE:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\include\torch\csrc\api\include -IE:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\include\TH -IE:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\include" -IE:\ANACONDA\envs\mmskeleton_2\include -IE:\ANACONDA\envs\mmskeleton_2\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" -c "F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\mmskeleton\ops\nms\gpu_nms.cpp" /Fo"F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\build\temp.win-amd64-cpython-37\Release\mmskeleton\ops\nms\gpu_nms.obj" -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=gpu_nms -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++14
FAILED: F:/projects/beyond-x-fit/project/beyond-x-fit GNN/ST-GCN/mmskeleton_master #2/mmskeleton/build/temp.win-amd64-cpython-37/Release/mmskeleton/ops/nms/gpu_nms.obj
cl /showIncludes /nologo /O2 /W3 /GL /DNDEBUG /MD /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -DWITH_CUDA -Immskeleton\ops\nms -IE:\ANACONDA\envs\mmskeleton_2\lib\site-packages\numpy\core\include -IE:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\include -IE:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\include\torch\csrc\api\include -IE:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\include\TH -IE:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\include" -IE:\ANACONDA\envs\mmskeleton_2\include -IE:\ANACONDA\envs\mmskeleton_2\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" -c "F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\mmskeleton\ops\nms\gpu_nms.cpp" /Fo"F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\build\temp.win-amd64-cpython-37\Release\mmskeleton\ops\nms\gpu_nms.obj" -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=gpu_nms -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++14
E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\mmskeleton\ops\nms\gpu_nms.cpp(2383): error C2664: 'void nms(int *,int *,const float *,int,int,float,int)': cannot convert argument 1 from 'pyx_t_5numpy_int32_t *' to 'int *'
F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\mmskeleton\ops\nms\gpu_nms.cpp(2383): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\mmskeleton\ops\nms\gpu_nms.hpp(1): note: see declaration of 'nms'
F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\mmskeleton\ops\nms\gpu_nms.cpp(2383): note: while trying to match the argument list '(pyx_t_5numpy_int32_t *, int *, pyx_t_5numpy_float32_t *, int, int, float, pyx_t_5numpy_int32_t)'
[2/2] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin\nvcc --generate-dependencies-with-compile --dependency-output "F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\build\temp.win-amd64-cpython-37\Release\mmskeleton\ops\nms\nms_kernel.obj".d --use-local-env -Xcompiler /MD -Xcompiler /wd4819 -Xcompiler /wd4251 -Xcompiler /wd4244 -Xcompiler /wd4267 -Xcompiler /wd4275 -Xcompiler /wd4018 -Xcompiler /wd4190 -Xcompiler /EHsc -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -DWITH_CUDA -Immskeleton\ops\nms -IE:\ANACONDA\envs\mmskeleton_2\lib\site-packages\numpy\core\include -IE:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\include -IE:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\include\torch\csrc\api\include -IE:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\include\TH -IE:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\include" -IE:\ANACONDA\envs\mmskeleton_2\include -IE:\ANACONDA\envs\mmskeleton_2\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" -c "F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\mmskeleton\ops\nms\nms_kernel.cu" -o "F:\projects\beyond-x-fit\project\beyond-x-fit GNN\ST-GCN\mmskeleton_master #2\mmskeleton\build\temp.win-amd64-cpython-37\Release\mmskeleton\ops\nms\nms_kernel.obj" -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_BFLOAT16_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS
--expt-relaxed-constexpr -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=gpu_nms -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75
nms_kernel.cu
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\utils\cpp_extension.py", line 1906, in _run_ninja_build
env=env)
File "E:\ANACONDA\envs\mmskeleton_2\lib\subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "setup.py", line 202, in
zip_safe=False)
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools_init_.py", line 107, in setup
return distutils.core.setup(**attrs)
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools_distutils\core.py", line 185, in setup
return run_commands(dist)
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools\dist.py", line 1234, in run_command
super().run_command(command)
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools\command\develop.py", line 34, in run
self.install_for_development()
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools\command\develop.py", line 111, in install_for_development
self.run_command('build_ext')
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools\dist.py", line 1234, in run_command
super().run_command(command)
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
_build_ext.run(self)
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools_distutils\command\build_ext.py", line 345, in run
self.build_extensions()
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\utils\cpp_extension.py", line 843, in build_extensions
build_ext.build_extensions(self)
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools_distutils\command\build_ext.py", line 467, in build_extensions
self._build_extensions_serial()
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools_distutils\command\build_ext.py", line 493, in _build_extensions_serial
self.build_extension(ext)
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools\command\build_ext.py", line 246, in build_extension
_build_ext.build_extension(self, ext)
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\setuptools_distutils\command\build_ext.py", line 555, in build_extension
depends=ext.depends,
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\utils\cpp_extension.py", line 825, in win_wrap_ninja_compile
with_cuda=with_cuda)
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\utils\cpp_extension.py", line 1578, in _write_ninja_file_and_compile_objects
error_prefix='Error compiling objects for extension')
File "E:\ANACONDA\envs\mmskeleton_2\lib\site-packages\torch\utils\cpp_extension.py", line 1916, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

@CMeiyi
Copy link

CMeiyi commented Jun 19, 2024

Have you solved the problem?

I had the same problem when installing ubuntu18.04.

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

2 participants