I am using:
-CentOS 6.6 on my Mac on virtual environment,
-Python 2.6.6 I am using this tutorial to install Django:
I am new to Python and Django and i found this tutorial easy to use so i was following the steps for Install through pip in a Virtualenv as i managed to install pip. it was working fine till i run pip install django command i got this output:
(djenv)[root@blue djProject]# pip install django
/root/djProject/djenv/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Collecting django
/root/djProject/djenv/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Using cached Django-1.8.3-py2.py3-none-any.whl
Installing collected packages: django
Successfully installed django-1.8.3
And after that when i try checking the version using django-admin --version command i got this error which i don't understand:
(djenv)[root@blue djProject]# clear; django-admin --version
Traceback (most recent call last):
File "/root/djProject/djenv/bin/django-admin", line 7, in <module>
from django.core.management import execute_from_command_line
File "/root/djProject/djenv/lib/python2.6/site-packages/django/__init__.py", line 1, in <module>
from django.utils.version import get_version
File "/root/djProject/djenv/lib/python2.6/site-packages/django/utils/version.py", line 7, in <module>
from django.utils.lru_cache import lru_cache
File "/root/djProject/djenv/lib/python2.6/site-packages/django/utils/lru_cache.py", line 28
fasttypes = {int, str, frozenset, type(None)},
^
SyntaxError: invalid syntax
Can anyone please help me with this error please.
Did you follow the link that it says contains more information?
It says:
If you encounter this warning, it is strongly recommended you upgrade to a newer Python version, or that you use pyOpenSSL as described in the OpenSSL / PyOpenSSL section.
Python 2.6.x is very old.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.