142👍
Found out what was wrong. I never installed the setuptools for python, so it was missing some vital files, like the egg ones.
If you find yourself having my issue above, download this file and then in powershell or command prompt, navigate to ez_setup’s directory and execute the command and this will run the file for you:
$ [sudo] python ez_setup.py
If you still need to install pip at this point, run:
$ [sudo] easy_install pip
easy_install was part of the setuptools, and therefore wouldn’t work for installing pip.
Then, pip will successfully install django with the command:
$ [sudo] pip install django
Hope I saved someone the headache I gave myself!
~Zorpix
- [Django]-How to make the foreign key field optional in Django model?
- [Django]-What does error mean? : "Forbidden (Referer checking failed – no Referer.):"
- [Django]-Sending HTML email in django
10👍
For me reinstalling and then upgrading the pip worked.
-
Reinstall pip by using below command or following link How do I install pip on macOS or OS X?
curl https://bootstrap.pypa.io/get-pip.py -o – | python
-
Upgrade pip after it’s installed
pip install -U pip
- [Django]-Whats the difference between using {{STATIC_URL}} and {% static %}
- [Django]-Django: Using F arguments in datetime.timedelta inside a query
- [Django]-Django template how to look up a dictionary value with a variable
7👍
See this :
What Python version can I use with Django?¶
https://docs.djangoproject.com/en/2.0/faq/install/
if you are using python27 you must to set django version :
try: $pip install django==1.9
- [Django]-Do we need to upload virtual env on github too?
- [Django]-Django-taggit – how do I display the tags related to each record
- [Django]-Django composite unique on multiple model fields
6👍
Having the same error trying to install matplotlib for Python 3, those solutions didn’t work for me. It was just a matter of dependencies, though it wasn’t clear in the error message.
I used sudo apt-get build-dep python3-matplotlib
then sudo pip3 install matplotlib
and it worked.
Hope it’ll help !
- [Django]-How to express a One-To-Many relationship in Django?
- [Django]-Django – SQL bulk get_or_create possible?
- [Django]-Does SQLAlchemy have an equivalent of Django's get_or_create?
4👍
In my case this error message appeared because the package I was trying to install (storm) was not supported for Python 3.
- [Django]-Are sessions needed for python-social-auth
- [Django]-Django-celery: No result backend configured
- [Django]-STATIC_ROOT vs STATIC_URL in Django
4👍
I’ll add this in here as my problem had something todo with my virtualenv
:
I hadn’t activated my virtual environment and was trying to install my requirements, this ultimately led to my install failing and throwing this error message.
So make sure you activate your virtualenv!
- [Django]-Is it possible to pass query parameters via Django's {% url %} template tag?
- [Django]-How do you catch this exception?
- [Django]-How do I do a not equal in Django queryset filtering?
4👍
I was trying to install pyautogui and followed instructions from the first answer but was unsuccessful. The difference for me was running pip install pillow
and then running pip install pyautogui
I don’t know what this means, but I hope this helps some people out.
- [Django]-How do you change the collation type for a MySQL column?
- [Django]-Django: Reference to an outer query may only be used in a subquery
- [Django]-Django – makemigrations – No changes detected
2👍
virtualenv is a tool to create isolated Python environments.
you will need to add the following to fix command python setup.py egg_info failed with error code 1, so inside your requirements.txt add this:
virtualenv==12.0.7
- [Django]-Django.db.migrations.exceptions.InconsistentMigrationHistory
- [Django]-How to compare two JSON objects with the same elements in a different order equal?
- [Django]-Django: remove a filter condition from a queryset
1👍
In my case, I had to uninstall pip and reinstall it. So I could install my specific version.
sudo apt-get purge --auto-remove python-pip
sudo easy_install pip
- [Django]-Django REST framework post array of objects
- [Django]-Django unit tests without a db
- [Django]-Django override save for model only in some cases?