How does 'pip' locate python executable?

I tried installing some packages using this command:

pip install -r requirements.txt

However, this fails with this error message:

Fatal error in launcher: Unable to create process using '"c:\dropbox\tools\python\python.exe" "D:\Dropbox\Tools\Python\Scripts\pip.exe" install -r requirements.txt': The system cannot find the file specified.

Now, pip, and python, are both installed in D:\dropbox\etc, the exact same path as above, just on the D: drive.

I've checked environment variables to see if there's anything odd:

> set | grep -i python
Path=D:\Dropbox\Tool...;D:\Dropbox\Tools\Python;D:\Dropbox\Tools\Python\Scripts;...
PYTHONHOME=D:\Dropbox\Tools\Python
PYTHON_HOME=D:\Dropbox\Tools\Python
PYTHONPATH=D:\Dropbox\Tools\Python\Lib;D:\Dropbox\Tools\Python\Libs;D:\Dropbox\Tools\Python\DLLs

There are no environment variables referencing C:... for python:

set | grep -i "C:\\dropbox\\tools\\python"

I did not install Python on this machine, it was synchronized onto it using Dropbox, but I have initialization scripts for the console application that I use (Cmder) that set up the path to python and everything according to the dropbox location.

If I try to use python to run pip, it runs successfully:

python -m pip install -r requirements.txt
(bunch of package checks, nothing installed though)

My question is as follows: Where/what/how does pip calculate/find python executable location? Meaning, what should I look for in order to find that C: reference that it incorrectly uses?

5 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like