Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip not running with Python 3.5

I have installed Python 3.5 and Pip but When I am type pip or pip3 in console, i get this error

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

If I run pwd, I get

/home/zahid

Pip was installed using

sudo python /usr/local/lib/python3.5/site-packages/easy_install.py pip

and output that I got was

[sudo] password for zahid: 
Searching for pip
Best match: pip 8.1.1
Adding pip 8.1.1 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip3.5 script to /usr/local/bin
Installing pip3 script to /usr/local/bin

Using /usr/local/lib/python3.5/site-packages
Processing dependencies for pip
Finished processing dependencies for pip

Can anyone tell me what is going on here

which python3 returns

/usr/bin/python3

which pip returns

/usr/local/bin/pip

which pip3 returns

/usr/local/bin/pip3

echo $PYTHONPATH returns

nothing blank

Regards

like image 902
Zahid Avatar asked Dec 08 '22 18:12

Zahid


2 Answers

Please close this terminal and open a new terminal. You may have deleted some files inadvertently. As a result the terminal is unable to locate some links or environment variables. I faced the same issue. In a new terminal everything went fine.

like image 184
infobliss Avatar answered Dec 11 '22 09:12

infobliss


I had this error on my Mac and restarting fixed this problem for me.

like image 38
Kevin Postlewaite Avatar answered Dec 11 '22 09:12

Kevin Postlewaite