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

[Bug]: Torch not found: can't install with pip install (Python 3.12, CUDA 12.6 Update 1, PyTorch 2.4.1) #77

Open
atemerev opened this issue Sep 20, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@atemerev
Copy link

atemerev commented Sep 20, 2024

Describe the bug

Installed torch with pip install torch. Everything went fine:

(~) python
Python 3.12.6 (main, Sep  9 2024, 00:00:00) [GCC 14.2.1 20240801 (Red Hat 14.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
True

Then, while attempting to install minference with pip install minference, got the following error:

     Traceback (most recent call last):
        File "/usr/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-dultiu8y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 332, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-dultiu8y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 302, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-dultiu8y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 503, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-dultiu8y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 318, in run_setup
          exec(code, locals())
        File "<string>", line 11, in <module>
      ModuleNotFoundError: No module named 'torch'
      [end of output]

Steps to reproduce

Fresh Fedora 40, fresh CUDA 12.6 Update 1 with cuda-gcc, fresh PyTorch 2.4.1.

Expected Behavior

Pip install should work.

Logs

No response

Additional Information

No response

@atemerev atemerev added the bug Something isn't working label Sep 20, 2024
@atemerev atemerev changed the title [Bug]: Can't install with pip install (Python 3.12, CUDA 12.6 Update 1, PyTorch 2.4.1) [Bug]: Torch not found: can't install with pip install (Python 3.12, CUDA 12.6 Update 1, PyTorch 2.4.1) Sep 20, 2024
@iofu728 iofu728 self-assigned this Sep 24, 2024
@iofu728
Copy link
Contributor

iofu728 commented Sep 24, 2024

Hi @atemerev, thanks for your feedback.

Could you try to install from source, as follow,

git clone https://github.com/microsoft/MInference
cd MInference
pip install -e .

@jacobgorm
Copy link

I am having the same problem with a different repo, I think the issue may be with pip or python, not the package. Were you able to make any progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants