Search code examples
python-2.7piphortonworks-data-platform

The folder you are executing pip from can no longer be found


I have a virtual machine under Hyper V that represents a cluster single-node of Hortonworks Data Platform with the following characteristics:

  • OS: centos 7.6.1810 minimal

  • python: 2.7.5

I installed pip package with the following command : yum -y install python-pip

The installation is well finished, but when I want to check the version of pip pip -V it gives me this error : The folder you are executing pip from can no longer be found.

My folder /usr/local/bin/ does not contain any files or folders.

paths of python2.7 : /usr/bin/python2.7 /usr/bin/python2 /usr/bin/python

the cmd which python returns : /bin/python

paths of pip : /usr/bin/pip /usr/bin/pip2 /usr/bin/pip2.7

which -a pip
/bin/pip
/usr/bin/pip

I'm stuck thanks for helping me please.


Solution

  • Adding it as an answer since it worked. Pip requires a log out/log in to set environment variables.

    Log out and log back in, try again and it seems to have worked.