gradient-cli icon indicating copy to clipboard operation
gradient-cli copied to clipboard

PyYAML 5.4.1 is broken, use PyYAML 5.3.1 instead

Open gameoverhack opened this issue 2 years ago • 4 comments

PyYAML version 5.4.1 is causing 'pip install gradient' to fail.

See: https://github.com/yaml/pyyaml/issues/724

Solution is to use 5.3.1

ie., change line 70 in setup.py from PyYAML==5.* to PyYAML==5.3.*

Collecting PyYAML==5.* (from gradient)
  Using cached PyYAML-5.4.1.tar.gz (175 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [62 lines of output]
      running egg_info
      writing lib3/PyYAML.egg-info/PKG-INFO
      writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
      writing top-level names to lib3/PyYAML.egg-info/top_level.txt
      /private/var/folders/fd/b8flfqkj3_bf4hp3dnr1l2hh0000gn/T/pip-build-env-usxd2f4p/overlay/lib/python3.8/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!
      
              ********************************************************************************
              The license_file parameter is deprecated, use license_files instead.
      
              By 2023-Oct-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************

gameoverhack avatar Aug 07 '23 10:08 gameoverhack

For anyone else struggling with this, until the devs fix it in the repo, you can force pip to use a different version like so:

  1. create a file called constraints.txt which contains PyYAML==5.3.*.
  2. install gradient with pip install -c constraints.txt gradient.

BobbyRaduloff avatar Nov 02 '23 14:11 BobbyRaduloff

Found this while trying to pip install with python 3.12.0 and 3.11.6

Use the workaround above

bitnovus avatar Nov 04 '23 17:11 bitnovus

gui is locked. will not record task

pi-robot-dev avatar May 04 '24 23:05 pi-robot-dev

This is resolved.

https://github.com/Paperspace/gradient-cli/pull/403

ypeng1 avatar Aug 12 '24 15:08 ypeng1