0

I am new to TeamCity and I do not know how to install packages I have imported in my python code on the TeamCity server. For example I have imported selenium in my code and tried to install it using command line on TeamCity by pip install selenium but I got the error pip: command not found. I am not sure this is the best way to install needed packages.

Peyman
  • 3,059
  • 1
  • 33
  • 68
Mahsa Mortazavi
  • 755
  • 3
  • 7
  • 23

1 Answers1

2

It seems like you don't have "pip" (Python package manager) installed on the machine that your Team City agent is running on. Team City does nothing but triggering your builds. In your case, it probably is only resolving dependencies (your Python packages) and running your code.

So you need to install pip on the machine that is running the Team City agent. (You might have multiple agents, install pip on all agents that might build this python project)

You might want to upgrade your Python. Python 2.7.9 and later already comes with pip. https://www.python.org/downloads/

Instruction on how to install pip. https://pip.pypa.io/en/latest/installing.html

You can SSH to that machine and run the following bash script (assuming you are on UNIX).

$ curl https://bootstrap.pypa.io/get-pip.py >> get-pip.py && sudo python get-pip.py
Peyman
  • 3,059
  • 1
  • 33
  • 68