The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I have a remote agent dedicated to my Bamboo Build Plan. I want to run a python script, which requires pip installation of libraries before the script can execute. I've already added the pip and python executables into the remote agent's capabilities, as such:
system.builder.python.Python38=C:\\Users\\...\\AppData\\Local\\Programs\\Python\\Python38\\python.exe
system.builder.py.pip=C:\\Users\\...\\AppData\\Local\\Programs\\Python\\Python38\\Lib\\site-packages\\pip
Broken Links:
tasks:
- checkout:
force-clean-build: 'false'
description: Checkout Default Repository
- script:
interpreter: BINSH_OR_CMDEXE
scripts:
- pip install BeautifulSoup4
- pip install lxml
- pip install requests
- python3 broken_links.py
requirements:
- Python38
- pip
But, when I run the pipeline, I get the error that pip and python3 are not recognised commands. Please help
Hello @Chong Jing Hong
Your scripts are probably lacking %PATH% declaration. You can either use the full path for each pip and python3 binaries or use the following variable substitution:
- %bamboo_capability_system_builder_py_pip% install BeautifulSoup4
- %bamboo_capability_system_builder_py_pip% install lxml
- %bamboo_capability_system_builder_py_pip% install requests
- %bamboo_capability_system_builder_python_Python38% broken_links.py
More info:
Regards,
Eduardo Alvarenga
Atlassian Support APAC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.