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

[Installation]: editable install fails with setuptools 70.0.0 #4961

Closed
5cp opened this issue May 21, 2024 · 4 comments
Closed

[Installation]: editable install fails with setuptools 70.0.0 #4961

5cp opened this issue May 21, 2024 · 4 comments
Labels
installation Installation problems

Comments

@5cp
Copy link

5cp commented May 21, 2024

Your current environment

Ubuntu 22.04.4 LTS
python 3.10.12
torch 2.1.2+cpu
vLLM 0.3.3+neuron205

How you are installing vllm

pip3 install -e vllm

Error message

  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... error
  error: subprocess-exited-with-error

  × Getting requirements to build editable did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      /tmp/pip-build-env-9h8zh2_3/overlay/local/lib/python3.10/dist-packages/torch/nn/modules/transformer.py:20: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at ../torch/csrc/utils/tensor_nu
mpy.cpp:84.)
        device: torch.device = torch.device(torch._C._get_default_device()),  # torch.device('cpu'),
      Traceback (most recent call last):
        File "/usr/local/lib/python3.10/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/local/lib/python3.10/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/usr/local/lib/python3.10/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in get_requires_for_build_editable
          return hook(config_settings)
        File "/tmp/pip-build-env-9h8zh2_3/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 448, in get_requires_for_build_editable
          return self.get_requires_for_build_wheel(config_settings)
        File "/tmp/pip-build-env-9h8zh2_3/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-9h8zh2_3/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-9h8zh2_3/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 13, in <module>
        File "/tmp/pip-build-env-9h8zh2_3/overlay/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 28, in <module>
          from pkg_resources import packaging  # type: ignore[attr-defined]
      ImportError: cannot import name 'packaging' from 'pkg_resources' (/tmp/pip-build-env-9h8zh2_3/overlay/local/lib/python3.10/dist-packages/pkg_resources/__init__.py)
      [end of output]

Workaround

setuptools 70.0.0 was released earlier today. Pinning it to version 69.5.1 here resolves the issue.

@5cp 5cp added the installation Installation problems label May 21, 2024
@roxas1212
Copy link

roxas1212 commented May 22, 2024

How do I apply it in paperspace?

@steysie
Copy link

steysie commented May 22, 2024

setuptools 70.0.0 was released earlier today. Pinning it to version 69.5.1 resolves the issue.

You saved me hours of further googling, thank you!

hanwen-pcluste pushed a commit to hanwen-pcluste/aws-parallelcluster that referenced this issue May 22, 2024
The [setuptools 70.0.0](https://pypi.org/project/setuptools/#history) release broke unit tests with Python 3.12. For example: https://github.com/aws/aws-parallelcluster/actions/runs/9196405216/job/25294425565?pr=6250)

The same failure has been encountered by others. For example, vllm-project/vllm#4961

Signed-off-by: Hanwen <[email protected]>
hanwen-pcluste pushed a commit to hanwen-pcluste/aws-parallelcluster that referenced this issue May 22, 2024
The [setuptools 70.0.0](https://pypi.org/project/setuptools/#history) release broke unit tests with Python 3.12. For example: https://github.com/aws/aws-parallelcluster/actions/runs/9196405216/job/25294425565?pr=6250)

The same failure has been encountered by others. For example, vllm-project/vllm#4961

Signed-off-by: Hanwen <[email protected]>
@5cp
Copy link
Author

5cp commented May 22, 2024

How do I apply it in paperspace?

  • git clone vllm
  • cd vllm
  • edit pyproject.toml, and modify this line to be "setuptools == 69.5.1",
  • pip3 install -e .

hanwen-pcluste pushed a commit to hanwen-pcluste/aws-parallelcluster that referenced this issue May 22, 2024
The [setuptools 70.0.0](https://pypi.org/project/setuptools/#history) release broke unit tests with Python 3.12. For example: https://github.com/aws/aws-parallelcluster/actions/runs/9196405216/job/25294425565?pr=6250)

The same failure has been encountered by others. For example, vllm-project/vllm#4961

Signed-off-by: Hanwen <[email protected]>
hanwen-pcluste pushed a commit to hanwen-pcluste/aws-parallelcluster that referenced this issue May 22, 2024
The [setuptools 70.0.0](https://pypi.org/project/setuptools/#history) release broke unit tests with Python 3.12. For example: https://github.com/aws/aws-parallelcluster/actions/runs/9196405216/job/25294425565?pr=6250)

The same failure has been encountered by others. For example, vllm-project/vllm#4961

Signed-off-by: Hanwen <[email protected]>
hanwen-pcluste pushed a commit to hanwen-pcluste/aws-parallelcluster that referenced this issue May 22, 2024
The [setuptools 70.0.0](https://pypi.org/project/setuptools/#history) release broke unit tests with Python 3.12. For example: https://github.com/aws/aws-parallelcluster/actions/runs/9196405216/job/25294425565?pr=6250)

The same failure has been encountered by others. For example, vllm-project/vllm#4961

Signed-off-by: Hanwen <[email protected]>
hanwen-pcluste pushed a commit to aws/aws-parallelcluster that referenced this issue May 22, 2024
The [setuptools 70.0.0](https://pypi.org/project/setuptools/#history) release broke unit tests with Python 3.12. For example: https://github.com/aws/aws-parallelcluster/actions/runs/9196405216/job/25294425565?pr=6250)

The same failure has been encountered by others. For example, vllm-project/vllm#4961

Signed-off-by: Hanwen <[email protected]>
hanwen-pcluste pushed a commit to hanwen-pcluste/aws-parallelcluster that referenced this issue May 23, 2024
The [setuptools 70.0.0](https://pypi.org/project/setuptools/#history) release broke unit tests with Python 3.12. For example: https://github.com/aws/aws-parallelcluster/actions/runs/9196405216/job/25294425565?pr=6250)

The same failure has been encountered by others. For example, vllm-project/vllm#4961

Signed-off-by: Hanwen <[email protected]>
hanwen-pcluste pushed a commit to aws/aws-parallelcluster that referenced this issue May 23, 2024
The [setuptools 70.0.0](https://pypi.org/project/setuptools/#history) release broke unit tests with Python 3.12. For example: https://github.com/aws/aws-parallelcluster/actions/runs/9196405216/job/25294425565?pr=6250)

The same failure has been encountered by others. For example, vllm-project/vllm#4961

Signed-off-by: Hanwen <[email protected]>
@DarkLight1337
Copy link
Member

FYI: torch>=2.2.0 updates torch/utils/cpp_extension.py to no longer import pkg_resources. Therefore, this problem should not occur with the latest version of vLLM which uses torch==2.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation Installation problems
Projects
None yet
Development

No branches or pull requests

4 participants