VISION-SJTU / 3dSwap

[CVPR 2023] 3D-Aware Face Swapping
76 stars 5 forks source link

subprocess.CalledProcessError #5

Open HeChengHui opened 1 year ago

HeChengHui commented 1 year ago

D:\anaconda3\envs\3dSwap\lib\site-packages\torch\utils\cpp_extension.py:304: 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}') INFO: Could not find files for the given pattern(s). Traceback (most recent call last): File "run_3dSwap.py", line 2, in from models.faceswap_coach import FaceSwapCoach File "F:\New folder\3dSwap\models\faceswap_coach.py", line 1, in from models.encoders.psp_encoders import GradualStyleEncoder File "F:\New folder\3dSwap\models\encoders\psp_encoders.py", line 8, in from models.stylegan2.model import EqualLinear File "F:\New folder\3dSwap\models\stylegan2\model.py", line 7, in from models.stylegan2.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d File "F:\New folder\3dSwap\models\stylegan2\op__init__.py", line 1, in from .fused_act import FusedLeakyReLU, fused_leaky_relu File "F:\New folder\3dSwap\models\stylegan2\op\fused_act.py", line 9, in fused = load( File "D:\anaconda3\envs\3dSwap\lib\site-packages\torch\utils\cpp_extension.py", line 1079, in load return _jit_compile( File "D:\anaconda3\envs\3dSwap\lib\site-packages\torch\utils\cpp_extension.py", line 1292, in _jit_compile _write_ninja_file_and_build_library( File "D:\anaconda3\envs\3dSwap\lib\site-packages\torch\utils\cpp_extension.py", line 1391, in _write_ninja_file_and_build_library _write_ninja_file_to_build_library( File "D:\anaconda3\envs\3dSwap\lib\site-packages\torch\utils\cpp_extension.py", line 1823, in _write_ninja_file_to_build_library _write_ninja_file( File "D:\anaconda3\envs\3dSwap\lib\site-packages\torch\utils\cpp_extension.py", line 1947, in _write_ninja_file cl_paths = subprocess.check_output(['where', File "D:\anaconda3\envs\3dSwap\lib\subprocess.py", line 415, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "D:\anaconda3\envs\3dSwap\lib\subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.

1) set up env following requirements, torch installed from here 2) download models and checkpoints and put them into their folders 3) ran python run_3dSwap.py

lyx0208 commented 1 year ago

It seems that you run the code on Windows. I've only tried it on Ubuntu so I haven't met this problem. Please try running the code on Linux if possible.

takuphilchan commented 1 year ago

I am facing the same issue as @HeChengHui is there a way to run it on windows and also what might be causing this issue?