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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.