Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to have python in Bamboo environment?

Chong Jing Hong May 4, 2022

I am trying to run a python script in my Bamboo Pipeline. However I am getting the following errors:

 

sudo: no tty present and no askpass program specified

line 2: pip: command not found

line 3: pip: command not found

 

Here is my bamboo.yaml file:

Broken Links:
  tasks:
    - checkout:
        force-clean-build: 'false'
        description: Checkout Default Repository
    - script:
        interpreter: BINSH_OR_CMDEXE
        scripts:
        - |-
          sudo yum install python3-pip
          pip install beautifulsoup4
          pip install lxml
          python broken_links.py

I suspect that the Bamboo environment does not have python. How do I know if my environment has python?

1 answer

0 votes
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 4, 2022

Hello @Chong Jing Hong

That's not Bamboo fault. You need to adjust your Operating system to make it work.

Make sure to:

  1. In your sudo configuration file (normally /etc/sudoers) make sure to set requiretty to false either globally as a Default setting or per rule for the yum install permission
  2. Newer versions of pip are now pip3, along with python is now python3.

 

Regards,

Eduardo Alvarenga
Atlassian Support APAC

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events