How to install packages using pip in jenkins -


i have created job in jenkins , trying build project.

my shell command:

#!/bin/bash source env/bin/activate cd petinstantapi pip install -r requirements.txt python manage.py migrate python manage.py test 

my console output says it's failed when installing packages in requirements file.

  oserror: [errno 13] permission denied: '/usr/local/lib/python2.7/dist-packages/django-1.8.dist-info' 

i have tried using

sudo     pip install -r requirements.txt 

but no luck.

by default, sudo prompts password. basically, have 2 options of solving that:

  1. running jenkins root, not you'd do, or
  2. allowing user jenkins runs under execute pip without password. add following line end of /etc/sudoers file (make sure use sudo visudo editing that):

    jenkins_user all=nopasswd:/usr/bin/pip


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -