18👍
Something happened in version 50 of setuptools.
We could "solve" this problem by downgrading setuptools to 49.3.0 (and maybe pip to 20.2.1)
pip install setuptools==49.3.0
and pip install pip==20.2.1
Be aware though that this should only be a temporary solution!
10👍
There is a temporary workaround described in the setuputils changelog:
export SETUPTOOLS_USE_DISTUTILS=stdlib
- How do I get a "debug" variable in my Django template context?
- Django media url is not resolved in 500 internal server error template
- How to get the submitted value of a form in a Django class-based view?
- Variable not found. Declare it as envvar or define a default value
1👍
Probably you are using setuptools 50.0.0. There are some issues with it. https://github.com/pypa/setuptools/issues/2356
Try to downgrade it.
pip install setuptools==49.6.0
- Django: why are Django model fields class attributes?
- Django: Highlight current page in navbar
- How would I override the perform_destroy method in django rest framework?
0👍
Try using the approved way in python3, where venv ia part of the stdlib:
/usr/bin/python3 -m venv /home/isaac/.virtualenvs/foobar
/home/isaac/.virtualenvs/foobar/bin/pip install django
- Save the related objects before the actual object being edited on django admin
- Django ALLOWED_HOSTS for Amazon ELB
0👍
I had a similar issue. I think it is the Django version you installed with pip. For me combination of Python3.5 and Django 1.9 did not give me that error.
$ rm -r /home/isaac/.virtualenvs/foobar #Remove the content
$ /usr/bin/python3 -m venv /home/isaac/.virtualenvs/foobar #Recreate your environment
$ cd /home/isaac/.virtualenvs/foobar
$ source bin/activate #Activate the environment
$ pip -V #(my version is 8.1.1 -> 20.x ==current version)
$ pip install django==1.9 #That version did not give an teh error
$ django-admin startproject yourprojectname #(worked nicely)
Alternative: Upgrade your Python version >= 3.6 on your Ubuntu machine and your’re ready to go with the latest Django version Here!
- Most elegant approach for writing JSON data to a relational database using Django Models?
- Django error admin.E033: username is not an attribute of users.CustomUser. Why is my custom user admin not working?
- Django 1.8 Migrations. Adding DateTimeField after db creation. Best practices?