ai-toolkit icon indicating copy to clipboard operation
ai-toolkit copied to clipboard

Error running job: cannot import name 'packaging' from 'pkg_resources' (C:\Users\Suifeng\AppData\Local\Programs\Python\Python311\Lib\site-packages\pkg_resources\__init__.py)

Open suifeng1221 opened this issue 1 year ago • 4 comments

suifeng1221 avatar Aug 16 '24 08:08 suifeng1221

Replace from pkg_resources import packaging to import packaging

https://github.com/pytorch/serve/issues/3176

martintomov avatar Aug 16 '24 10:08 martintomov

thanks,the error has been solved,but another error “Torch not compiled with CUDA enabled“,tried a lot of ways ,still not solved

suifeng1221 avatar Aug 20 '24 02:08 suifeng1221

try this:

Hi, turns out the issue was that I was using the wrong start command (on Windows) so use python run.py config/whatever_you_want.yml instead of python3 run.py config/whatever_you_want.yml

This exists to distinguish between Python 2.x and Python 3.x installations on systems where both versions are available. Nowadays, Python 2 is hardly ever used, so the best way is to check which one you have is with --version:

python --version
python3 --version
pip --version
pip3 --version

Originally posted by @martintomov in https://github.com/ostris/ai-toolkit/issues/88#issuecomment-2298320293

martintomov avatar Aug 20 '24 08:08 martintomov

I used the same code,not used

试试这个:

嗨,原来问题是我使用了错误的启动命令(在 Windows 上),所以使用 python run.py config/whatever_you_want.yml而不是 python3 run.py config/whatever_you_want.yml

这是为了区分 Python 2.x 和 Python 3.x 在这两个版本都可用的系统上安装。如今,Python 2 几乎从未使用过,因此最好的方法是检查您拥有的是:--version

python --version
python3 --version
pip --version
pip3 --version

引用自 #88 (评论)

suifeng1221 avatar Aug 21 '24 01:08 suifeng1221