AcademySoftwareFoundation / aswf-docker

Common container configuration
Apache License 2.0
145 stars 35 forks source link

Installation of aswf-docker - yaml issue #127

Open hodoulp opened 2 years ago

hodoulp commented 2 years ago

To use the ASWF docker images, I installed the aswf-docker utility following the steps explained here. Even if it successfully installs the tool (i.e. aswf-docker is working fine), it reports an error around yaml during the installation:

  1. git clone https://github.com/AcademySoftwareFoundation/aswf-docker
  2. cd aswf-docker
  3. python3 setup.py install

The installation is on macOS 10.15.7 with docker 20.10.7

Installed /usr/local/lib/python3.9/site-packages/requests-2.23.0-py3.9.egg
Searching for pyyaml==5.3.1
Reading https://pypi.org/simple/pyyaml/
Downloading https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz#sha256=b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d
Best match: PyYAML 5.3.1
Processing PyYAML-5.3.1.tar.gz
Writing /var/folders/bv/l130z2yj1h322ry0n1bhk6th0000gp/T/easy_install-affusizc/PyYAML-5.3.1/setup.cfg
Running PyYAML-5.3.1/setup.py -q bdist_egg --dist-dir /var/folders/bv/l130z2yj1h322ry0n1bhk6th0000gp/T/easy_install-affusizc/PyYAML-5.3.1/egg-dist-tmp-oxg38707
warning: the 'license_file' option is deprecated, use 'license_files' instead
In file included from ext/_yaml.c:596:
ext/_yaml.h:2:10: fatal error: 'yaml.h' file not found
#include <yaml.h>
         ^~~~~~~~
1 error generated.
Error compiling module, falling back to pure Python
zip_safe flag not set; analyzing archive contents...
Copying PyYAML-5.3.1-py3.9-macosx-10.15-x86_64.egg to /usr/local/lib/python3.9/site-packages
Adding PyYAML 5.3.1 to easy-install.pth file
aloysbaillet commented 2 years ago

Looks like an wheel/pyyaml issue: https://github.com/aws/aws-cli/issues/4243 Upgrading the packages should fix that. I was planning on upgrading to python 3.9 soon so hopefully that will fix that issue. Did you try with pipenv? Also, you can now run pip install aswfdocker but I've only tested it on windows and linux, not macs...

aloysbaillet commented 2 years ago

Latest version of aswfdocker on PyPi might be worth another try as I upgraded quite a few dependencies

jfpanisset commented 1 year ago

Having just run into something similar on Ubuntu, the pyyaml package (optionally?) depends on libyaml and its yaml.h header file. On Ubuntu:

sudo apt install libyaml-dev

did the trick, I suspect on macOS you would want to do:

brew install libyaml

(assuming you already have Homebrew installed).