Skip to content

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

@devangvin

Description

@devangvin

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions