Problem installing pip

Hello Fellow Learners,

I am struggling with pip installation. I entered the following commands to install pip which apparently was successful but I am not being able to use pip to install Django or any other packages for that matter. Can anyone please help me to identify a solution ?

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py

MBP-de-Sujay:~ Sujay$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1738k 100 1738k 0 0 1092k 0 0:00:01 0:00:01 --:–:-- 1092k
MBP-de-Sujay:~ Sujay$ python3 get-pip.py
Requirement already up-to-date: pip in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
MBP-de-Sujay:~ Sujay$ pip install Django
-bash: pip: command not found

Hi,
After 4 hours of fumbling around in the Terminal and on the net, I found the solution to my problem which I have to admit is peculiar.

Step N° 1 : uninstall pip using the following command
python3 -m pip uninstall pip setuptools

Step N° 2 : install pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py

Step N° 3 : use pip to install Django
pip install Django

Hmmm, I think I may need to update my instructions because pip already comes with Python 3, usually. Is there a reason you’re using the one from pypa.io?

Hello Zed,

For some reason that I fail to grasp, everytime I tried to install Django using pip, it didn’t work.
In the Django installation manual I found instructions for installation of pip which suggest the use of a standalone pip installer : curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

https://docs.djangoproject.com/en/2.0/topics/install/#installing-official-release

I have observed that even the pip installation guide points to the same url.

No you shouldn’t need to do any of this manual install of pip. I would say, first create a virtualenv and then work inside that. Your problem may be entirely that you’re trying to install the django software into your main machine, which will cause problems. I also suggest going and asking django people for help. They’re the ones who are best capable at getting your install working.

Either way, I’d ditch this pypa.io install of every.

Sorry of the delayed response. I followed your recommendation. I am working inside a virtualenv. For the moment things seem to be working well. I installed the latest version of Django inside the virtualenv using pip which is a promising sign.

Ok yeah I think the direction of python is going just use pip for everything.

1 Like