Skip to content

[Bug]: missing warnings import in setup.py #28

Closed

Description

Describe the bug

When installing minference from pip there is an error:

└─[$] pip install minference                                  [17:43:23]
Collecting minference
  Using cached minference-0.1.4.post1.tar.gz (113 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-4lvguf9y/minference_c0eb86ae3c5f4f13b3d9f6ddd78ae365/setup.py", line 98, in <module>
          check_if_cuda_home_none("minference")
        File "/tmp/pip-install-4lvguf9y/minference_c0eb86ae3c5f4f13b3d9f6ddd78ae365/setup.py", line 74, in check_if_cuda_home_none
          warnings.warn(
          ^^^^^^^^
      NameError: name 'warnings' is not defined. Did you mean: 'Warning'?
      
      
      torch.__version__  = 2.3.1+cu121
      
      
      [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.

This is probably occuring because there is import error in setup.py file link

warnings is not imported.

Steps to reproduce

I am using conda environment. Python version is :

python3 --version
# output: Python 3.11.9

I have pytorch installed alongwith the cuda libraries.
Simply run: pip install minference

Expected Behavior

the library should have installed or a warning should be generated.

Logs

No response

Additional Information

No response

Activity

  1. iofu728 commented on Jul 12, 2024

    @iofu728
    Contributor

    Hi Dewang Vinchhi (@devangvin), thank you for your feedback. This is a known issue, and we will have it fixed by the end of the day.

  2. iofu728 commented on Jul 12, 2024

    @iofu728
    Contributor

    Fixed in #30, please try to use pip install minference -U.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions