I got stuck trying to install Django after installing python I will write the solution in that case.
Enter the following command on the terminal:
pip install django
This should install Django, but I get the following error:
-bash: pip: command not found
It seems to be an error saying "This command cannot be used because pip is not installed ".
Then install pip and run the following command:
python -m pip install -U pip
Then I get the following error:
/usr/bin/python: No module named pip
Apparently it's an error saying "python doesn't have pip".
Recalling that python and python3 were different, I typed the following command:
python3 -m pip install -U pip
This time it seemed to work and I got the following message:
Collecting pip
  Downloading https://files.pythonhosted.org/packages/(Omission) (1.4MB)
     |████████████████████████████████| 1.4MB 1.4MB/s 
Installing collected packages: pip
  Found existing installation: pip 19.2.3
    Uninstalling pip-19.2.3:
      Successfully uninstalled pip-19.2.3
Successfully installed pip-20.0.2
Enter the following command again.
pip install django
This also worked, and I got the following message:
Collecting django
  Downloading Django-3.0.4-py3-none-any.whl (7.5 MB)
     |████████████████████████████████| 7.5 MB 2.0 MB/s 
Collecting asgiref~=3.2
  Downloading asgiref-3.2.5-py2.py3-none-any.whl (19 kB)
Collecting pytz
  Downloading pytz-2019.3-py2.py3-none-any.whl (509 kB)
     |████████████████████████████████| 509 kB 46.8 MB/s 
Collecting sqlparse>=0.2.2
  Downloading sqlparse-0.3.1-py2.py3-none-any.whl (40 kB)
     |████████████████████████████████| 40 kB 701 kB/s 
Installing collected packages: asgiref, pytz, sqlparse, django
Successfully installed asgiref-3.2.5 django-3.0.4 pytz-2019.3 sqlparse-0.3.1
That's it.
Recommended Posts