microsoft / MInference

To speed up Long-context LLMs' inference, approximate and dynamic sparse calculate the attention, which reduces inference latency by up to 10x for pre-filling on an A100 while maintaining accuracy.
https://aka.ms/MInference
MIT License
573 stars 20 forks source link

[Question]: pip install minference error: cannot import name 'packaging' from 'pkg_resources' #12

Closed junior-zsy closed 2 weeks ago

junior-zsy commented 2 weeks ago

Describe the bug

pip install minference Looking in indexes: https://mirrors.cloud.tencent.com/pypi/simple Collecting minference Using cached https://mirrors.cloud.tencent.com/pypi/packages/26/0a/d4e339371c8b3673bd353ba51fdb55f381905f31daf2fb715d030d1d0c18/minference-0.1.3.tar.gz (57 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [8 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/xxx/cache/tmp_dir/pip-install-6fkcqpqc/minference_6a95e304095b41bca85993d66c42b88e/setup.py", line 13, in from torch.utils.cpp_extension import CUDA_HOME, BuildExtension, CUDAExtension File "/xxx/miniconda3/envs/minference/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 28, in from pkg_resources import packaging # type: ignore[attr-defined] ImportError: cannot import name 'packaging' from 'pkg_resources' (/xxx/miniconda3/envs/minference/lib/python3.10/site-packages/pkg_resources/init.py) [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

Steps to reproduce

No response

Expected Behavior

No response

Logs

No response

Additional Information

No response

junior-zsy commented 2 weeks ago

pip install setuptools==69.5.1 Solved my problem