python - Jenkins - pip having long shebang line: No such file or directory error -


i have jenkins job in using virtualenv , installing python modules (enlisted in requirements file).

my code pretty simple:

virtualenv env source ./env/bin/activate echo $(python --version) echo $(which pip) echo $(pip --version) 

when job runs, python , pip show me correct output pip --version throws error:

++ python /scratch/jenkins/ncs-jenkins/workspace/proj/docker/mail/tools/ici/gate/kokilla-gold/testproj-my    deploy-newchanges-20/env/bin/python   ++ pip /scratch/jenkins/ncs-jenkins/workspace/proj/docker/mail/tools/ici/gate/kokilla-gold/testproj-my    deploy-newchanges-20/env/bin/pip  ++ pip --version /tmp/hudson2230168319717284464.sh: /scratch/jenkins/ncs-jenkins/workspace/proj/docker/mail/tools/ici/gate/kokilla-gold/testproj-my    deploy-newchanges-20/env/bin/pip: /scratch/jenkins/ncs-jenkins/workspace/proj/docker/mail/tools/ici/gate/kokilla-gold/testproj-my    deploy-newchanges-20/: bad interpreter: no such file or directory 

i think what's going on here shebang line greater 127 chars , that's causing issue. referenced here. path

path=/scratch/jenkins/ncs-jenkins/workspace/proj/docker/mail/tools/ici/gate/kokilla-gold/testproj-my    deploy-newchanges-20/env/bin:/usr/local/bin:/usr/bin 

/scratch/jenkins/ncs-jenkins/workspace/proj/docker/mail/tools/ici/gate/kokilla-gold/testproj-mydeploy-newchanges-20/env/‌​bin/pip text file. here contents:

#!/scratch/jenkins/ncs-jenkins/workspace/proj/docker/mail/tools/ici/gate/kokilla-gold/testproj-mydeploy-newchanges-20/env/bin/python  # -*- coding: utf-8 -*- import re import sys  pip import main  if __name__ == '__main__':     sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])     sys.exit(main()) 

i'm not sure can change shebang line in pip because autogenerated , stored in jenkins workspace when run virtualenv. can prevent error?


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -