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

Problem with setup_cuda.py install #47

Closed
farrael004 opened this issue Mar 15, 2023 · 14 comments
Closed

Problem with setup_cuda.py install #47

farrael004 opened this issue Mar 15, 2023 · 14 comments

Comments

@farrael004
Copy link

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.

@TheTerrasque
Copy link

I'm guessing you're missing VS build toolkit. #11 (comment) - Need that for windows.

Alternatively you can use WSL2 or Docker

@farrael004
Copy link
Author

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

@papuSpartan
Copy link

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.

@farrael004
Copy link
Author

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.

@DamascusGit
Copy link

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.

@farrael004
Copy link
Author

farrael004 commented Mar 23, 2023

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.

@DamascusGit
Copy link

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
Copy link

DamascusGit commented Mar 23, 2023

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?

@farrael004
Copy link
Author

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

@DamascusGit
Copy link

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.

@mityarko
Copy link

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

@Brawlence
Copy link

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

@qwopqwop200
Copy link
Owner

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

@Paillat-dev
Copy link

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

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

8 participants