Skip to content

Make message on installation failure due to missing SDK more informative #25

@collineps

Description

@collineps

Currently, installation failure because the PyVCAM SDK has not been installed is not helpful. It seems at first glance to indicate that the problem is that Python dependency packages are not installed. Update failure message to show that the SDK must be installed.

Example error message:

collineps@cMac:~/.../PyVCAM [11-versioning=]$ pip install .
Processing /Users/collineps/Documents/Academic/Waterloo/Research/Code/PyVCAM
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [28 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/Users/collineps/Documents/Academic/Waterloo/Research/Code/PyVCAM/setup.py", line 57, in <module>
          pvcam_sdk_path = os.environ['PVCAM_SDK_PATH']
        File "/usr/local/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 679, in __getitem__
          raise KeyError(key) from None
      KeyError: 'PVCAM_SDK_PATH'
      Operating system: Darwin
      Machine architecture: x86_64
      ************************************************************

      Pre-install necessary packages as admin

         python -m pip install --upgrade pip setuptools wheel numpy

      ************************************************************

      Build package:     python setup.py build

      Install package:   python setup.py install

      Create Wheel dist: python setup.py sdist bdist_wheel

      Uninstall package: pip uninstall pyvcam

      ************************************************************

      [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.

[notice] A new release of pip is available: 23.0 -> 23.0.1
[notice] To update, run: pip install --upgrade pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdeploymentDeploying packages/programsdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions