-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running into error building an EE #706
Comments
ansible-core 2.16 requires a minimum of Python 3.10, as such, pip cannot find a version of core between 2.16 and 2.17 that will install on Python 3.9. You can add the following to your EE definition to utilize a newer python: dependencies:
+ python_interpreter:
+ package_system: python3.12
ansible_core:
package_pip: ansible-core>=2.16,<2.17
ansible_runner:
package_pip: ansible-runner |
Thanks for the reply! Unfortunately it doesn't help. I added the lines, ran it again and can see that Pyton 3.12 and dependencies are being installed, but the error remains the same. |
That's my fault, I forgot another line: dependencies:
+ python_interpreter:
+ package_system: python3.12
+ python_path: /usr/bin/python3.12
ansible_core:
package_pip: ansible-core>=2.16,<2.17
ansible_runner:
package_pip: ansible-runner However, you probably also want to make this change as well, unless you remove your debugging line completely: ---
version: 3
images:
base_image:
name: 'quay.io/centos/centos:stream9'
dependencies:
+ python_interpreter:
+ package_system: python3.12
+ python_path: /usr/bin/python3.12
ansible_core:
package_pip: ansible-core>=2.16,<2.17
ansible_runner:
package_pip: ansible-runner
galaxy: requirements.yml
python: requirements.txt
system: bindep.txt
additional_build_steps:
- prepend_base:
- - RUN python3 -V
append_base:
+ - RUN $PYCMD -V
- RUN $PYCMD -m pip install -U pip
append_final:
[…] |
Thanks again! This seems to work. When I add the code Python3.12 gets installed.
It still seems to be within the first step of the builder, so I thought adding the command to "prepend_base" would result in it working:
But then I get this error:
|
If I remove everything in "prepend_base" and "append_base" it works. |
Hello,
I'm trying to build an EE with the Ansible Builder.
My configuration looks like this:
execution-environment.yml
requirements.txt
Installed versions in venv:
When I run "ansible-builder build --tag test.org/test-docker/test-ee:$container_tag --context context --verbosity 3" via a Pipeline it starts normally, but runs into an ERROR and a WARNING:
It seems like it doesn't matter what's installed in the venv since the ansible-builder installs its own packages. The "RUN python3 -V" command prepended to the base step returns "Python 3.9.19"
Is there anything I'm missing?
Thanks in advance!
The text was updated successfully, but these errors were encountered: