'pip' is not recognized as an internal or external command under Subprocess

413 Views Asked by At

I have some virtualenv under Jenkins CI which collect my package and running:

python setup.py test

the virtualenv has pip installed and i'm exporting the path .my_env/Scripts (the CI is under windows), At my setup.py i'm trying to call pip to install pywin32 using subprocess.call, script output:

+ pip list
pip (7.0.3)
setuptools (17.1.1)
+ echo '######### starting test #########'
######### starting test #########
+ python setup.py test
'pip' is not recognized as an internal or external command,
operable program or batch file.

You can see that pip list is working find then i'm calling the setup.py test

setup.py

...
if sys.platform == 'win32':
    bin_path = join(dirname(realpath(__file__)), 'bin', 'pywin32-219.zip')
    subprocess.call(['pip', 'install', bin_path], shell=True)
...

Any idea why pip is recognised at the Jenkins shell but not at the subprocess.call?

0

There are 0 best solutions below