GPTQ-for-LLaMa icon indicating copy to clipboard operation
GPTQ-for-LLaMa copied to clipboard

Problem with setup_cuda.py install

Open farrael004 opened this issue 1 year ago • 11 comments

Hi,

When running python setup_cuda.py install I get the following error:

running install
running bdist_egg
running egg_info
writing quant_cuda.egg-info\PKG-INFO
writing dependency_links to quant_cuda.egg-info\dependency_links.txt
writing top-level names to quant_cuda.egg-info\top_level.txt
reading manifest file 'quant_cuda.egg-info\SOURCES.txt'
writing manifest file 'quant_cuda.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_ext
error: [WinError 2] The system cannot find the file specified

I have no idea why this is happening. Any help would be appreciated.

farrael004 avatar Mar 15 '23 05:03 farrael004

I'm guessing you're missing VS build toolkit. https://github.com/qwopqwop200/GPTQ-for-LLaMa/issues/11#issuecomment-1462643016 - Need that for windows.

Alternatively you can use WSL2 or Docker

TheTerrasque avatar Mar 16 '23 00:03 TheTerrasque

It's installed. Maybe something from it is not in path? I wouldn't know what though.

farrael004 avatar Mar 16 '23 02:03 farrael004

It's installed. Maybe something from it is not in path? I wouldn't know what though.

Open windows search by hitting Windows + S and search native. You should see x64 Native Tools Command Prompt for VS 2019 (make sure you do not select the wrong year if you already had another version installed like 2022). Also, since it's a cmd shell and not powershell you will need to run set DISTUTILS_USE_SDK=1 instead of $env:DISTUTILS_USE_SDK=1.

papuSpartan avatar Mar 18 '23 08:03 papuSpartan

That doesn't work either. I managed to run it in a docker image, but that's just a workaround. Unfortunately even that doesn't work for what I want to do.

farrael004 avatar Mar 18 '23 09:03 farrael004

That doesn't work either. I managed to run it in a docker image, but that's just a workaround. Unfortunately even that doesn't work for what I want to do.

same here. i am getting the exact same error, have tried everything and still getting this issue. i've also got VS 2019, i set DISTUTILS, i do everything and still no help.

DamascusGit avatar Mar 23 '23 01:03 DamascusGit

I managed to find a workaround (It requires a bit of Linux knowledge). Install Ubuntu 22.04 from the Microsoft Store, then open it and follow the installation process for linux instead. I installed cuda in this linux too, but I'm not sure if it was necessary. If you do, just make sure that the cuda installed in your windows and linux are the same version, otherwise you'll run into errors.

farrael004 avatar Mar 23 '23 01:03 farrael004

I managed to find a workaround (It requires a bit of Linux knowledge). Install Ubuntu 22.04 from the Microsoft Store, then open it and follow the installation process for linux instead. I installed cuda in this linux too, but I'm not sure if it was necessary. If you do, just make sure that the cuda installed in your windows and linux are the same version, otherwise you'll run into errors.

can you speak to more detailed instructions? dying to run this.

DamascusGit avatar Mar 23 '23 01:03 DamascusGit

like, where are the linux setup instructions? is it the same instructions once i have followed the WSL setup? how do i use the VSCode build tools in linux?

DamascusGit avatar Mar 23 '23 02:03 DamascusGit

It's essentially the same thing, but you don't have to install build tools for it since linux comes with a C++ compiler.

farrael004 avatar Mar 23 '23 03:03 farrael004

ah yeah, it didn't work for me on linux, but it worked on python 3.10 with the alternate install workaround. it gave me a "CUDA extension not installed" message, but is currently loading the sharded checkpoints anyway.

DamascusGit avatar Mar 23 '23 03:03 DamascusGit

If you are using conda try the following:

conda install cudatoolkit=11.7 -c conda-forge
conda install cuda -c nvidia/label/cuda-11.7.0
python setup_cuda.py install

mityarko avatar Mar 23 '23 17:03 mityarko

ah yeah, it didn't work for me on linux, but it worked on python 3.10 with the alternate install workaround. it gave me a "CUDA extension not installed" message, but is currently loading the sharded checkpoints anyway.

Be aware: that wheel is an old (2 weeks, lmao) version and it may not work with the current patches.

For any lost souls who look for compiled kernels, it's probably best to use: https://github.com/jllllll/GPTQ-for-LLaMa-Wheels

Brawlence avatar Mar 28 '23 08:03 Brawlence

currently using triton, so I don't think this problem will occur.

qwopqwop200 avatar Apr 02 '23 03:04 qwopqwop200

Yes of course, but not for windows users... I's a shame

Paillat-dev avatar May 11 '23 14:05 Paillat-dev