Barbershop icon indicating copy to clipboard operation
Barbershop copied to clipboard

In WIN10 anaconda error

Open ffdown opened this issue 2 years ago • 3 comments

e:\Anaconda3\envs\env_Sid\lib\site-packages\torch\utils\cpp_extension.py:322: UserWarning: Error checking compiler version for cl: [WinError 2] Не удается найти указанный файл warnings.warn(f'Error checking compiler version for {compiler}: {error}') ИНФОРМАЦИЯ: не удается найти файлы по заданным шаблонам. Traceback (most recent call last): File "main.py", line 13, in from models.Embedding import Embedding File "C:\Users\user\Barbershop\models\Embedding.py", line 3, in from models.Net import Net File "C:\Users\user\Barbershop\models\Net.py", line 3, in from models.stylegan2.model import Generator File "C:\Users\user\Barbershop\models\stylegan2\model.py", line 11, in from models.stylegan2.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d File "C:\Users\user\Barbershop\models\stylegan2\op_init_.py", line 1, in from .fused_act import FusedLeakyReLU, fused_leaky_relu File "C:\Users\user\Barbershop\models\stylegan2\op\fused_act.py", line 14, in os.path.join(module_path, "fused_bias_act_kernel.cu"), File "e:\Anaconda3\envs\env_Sid\lib\site-packages\torch\utils\cpp_extension.py", line 1156, in load keep_intermediates=keep_intermediates) File "e:\Anaconda3\envs\env_Sid\lib\site-packages\torch\utils\cpp_extension.py", line 1367, in _jit_compile is_standalone=is_standalone) File "e:\Anaconda3\envs\env_Sid\lib\site-packages\torch\utils\cpp_extension.py", line 1465, in _write_ninja_file_and_build_library is_standalone=is_standalone) File "e:\Anaconda3\envs\env_Sid\lib\site-packages\torch\utils\cpp_extension.py", line 1908, in _write_ninja_file_to_build_library with_cuda=with_cuda) File "e:\Anaconda3\envs\env_Sid\lib\site-packages\torch\utils\cpp_extension.py", line 2024, in _write_ninja_file 'cl']).decode(*SUBPROCESS_DECODE_ARGS).split('\r\n') File "e:\Anaconda3\envs\env_Sid\lib\subprocess.py", line 411, in check_output **kwargs).stdout File "e:\Anaconda3\envs\env_Sid\lib\subprocess.py", line 512, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.

ffdown avatar May 02 '22 09:05 ffdown

same issue here

panmlg avatar May 02 '22 16:05 panmlg

Hi, I found out the issue is that you don't have cl.exe installed on your computer. Therefore, installing C++ compiler worked for me. I installed Visual Studio first and then compiler according to https://code.visualstudio.com/docs/cpp/config-msvc. After installation I also added folder with cl.exe (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\Hostx64\x64) to the System Variable Path. You can check the succesful installation by the command cl or cl.exe - it is described in the link above. After installation of cl.exe restart the prompt window and Anaconda.

CarlFoxus avatar May 13 '22 13:05 CarlFoxus

Hi, I found out the issue is that you don't have cl.exe installed on your computer. Therefore, installing C++ compiler worked for me. I installed Visual Studio first and then compiler according to https://code.visualstudio.com/docs/cpp/config-msvc. After installation I also added folder with cl.exe (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\Hostx64\x64) to the System Variable Path. You can check the succesful installation by the command cl or cl.exe - it is described in the link above. After installation of cl.exe restart the prompt window and Anaconda.

Can you deploy it on Windows 10? Why do I have a lot of dependencies that don't install? Can you teach me?

lcl124252 avatar Oct 02 '23 06:10 lcl124252