shinesolutions/packer-aem

Baking error on virtualenv installation

Closed this issue · 1 comments

Describe the bug
Baking failed when installing virtualenv.
here is error message
Error: /Stage[main]/Config::Base/Config::Python_virtualenv[Config base python virtualenvs installation]/Pip::Install[virtualenv]/Exec[install-virtualenv]/returns: change from 'notrun' to ['0'] failed: 'pip2.7 install virtualenv==16.7.9' returned 1 instead of one of [0]

To Reproduce
Steps to reproduce the behavior:
1- make deps
2- make aws-java config_path=/path/to/config

Expected behavior
It should install virtualenv in baking step without error

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information if relevant):

  • Libraries and versions: [packer-aem master]
  • OS [rhel7, jdk11, AEM65]

Additional context
N/A

packer-aem is using an old Puppet module 'tracywebtech-pip', which attempted to install the 'virtualenv' package into Python 2 and produced the error (see screenshot below). (The module has not been improved since 2015).

Issue was caused by pip 21.0+ which from Jan 2021, no longer supports Python 2. As a result, when the puppet module attempted to install 'virtualenv' into Python 2, with pip 21.0+, it failed.

The '::python' class can be used to install the virtualenv package. As a result, the function of installing the 'virtualenv' package will be taken over by the class.

Screen Shot 2021-02-02 at 10 39 04 am