samedi 29 novembre 2014

python - django commande "django-admin.py startproject monsite" - Stack Overflow


 D:\python\Project>c:\Python30\Scripts\django-admin.py startproject mysite
Traceback (most recent call last):
File "C:\Python30\Scripts\django-admin.py", line 2, in <module>
from django.core import management
File "c:\python30\Lib\site-packages\django\core\management\__init__.py", line
9, in <module>
from django.core.management.base import BaseCommand, CommandError, handle_de
fault_options
File "c:\python30\Lib\site-packages\django\core\management\base.py", line 15,
in <module>
from django.utils.encoding import force_str
File "c:\python30\Lib\site-packages\django\utils\encoding.py", line 13, in <mo
dule>
from django.utils.functional import Promise
File "c:\python30\Lib\site-packages\django\utils\functional.py", line 350, in
<module>
from functools import total_ordering
ImportError: cannot import name total_ordering



You use Python 3.x version. This Python version have experimental support in latest django release 1.5, but in any case, this is not so useful.


You need to use Python 2.7 for now.




You need to either downgrade Python to 2.7, or upgrade Python to 3.2 or newer (current stable 3.x is 3.3) and use Django 1.5. I'd recommend the downgrade option if you want stability.



Django 1.5 is the first Django release with support for Python 3 (specifically, Python 3.2 and newer). Python 3 support is still considered experimental -- largely because it hasn't received as much real-world testing as we'd like -- but a Python 3 porting guide is available if you'd like to give it a try, and we will be considering Python 3 compatibility bugs to be blockers for future releases.




 D:\python\Project>c:\Python30\Scripts\django-admin.py startproject mysite
Traceback (most recent call last):
File "C:\Python30\Scripts\django-admin.py", line 2, in <module>
from django.core import management
File "c:\python30\Lib\site-packages\django\core\management\__init__.py", line
9, in <module>
from django.core.management.base import BaseCommand, CommandError, handle_de
fault_options
File "c:\python30\Lib\site-packages\django\core\management\base.py", line 15,
in <module>
from django.utils.encoding import force_str
File "c:\python30\Lib\site-packages\django\utils\encoding.py", line 13, in <mo
dule>
from django.utils.functional import Promise
File "c:\python30\Lib\site-packages\django\utils\functional.py", line 350, in
<module>
from functools import total_ordering
ImportError: cannot import name total_ordering


You use Python 3.x version. This Python version have experimental support in latest django release 1.5, but in any case, this is not so useful.


You need to use Python 2.7 for now.



You need to either downgrade Python to 2.7, or upgrade Python to 3.2 or newer (current stable 3.x is 3.3) and use Django 1.5. I'd recommend the downgrade option if you want stability.



Django 1.5 is the first Django release with support for Python 3 (specifically, Python 3.2 and newer). Python 3 support is still considered experimental -- largely because it hasn't received as much real-world testing as we'd like -- but a Python 3 porting guide is available if you'd like to give it a try, and we will be considering Python 3 compatibility bugs to be blockers for future releases.



0 commentaires:

Enregistrer un commentaire