标签:
1. 在执行python manage.py shell之后的一些错误:
wyl@wyl:~/myobject$ python manage.py shell /usr/lib/python2.7/dist-packages/pkg_resources.py:1049: UserWarning: /home/wyl/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable). warnings.warn(msg, UserWarning) Python 2.7.8 (default, Oct 20 2014, 15:05:19) Type "copyright", "credits" or "license" for more information. IPython 2.3.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython‘s features. %quickref -> Quick reference. help -> Python‘s own help system. object? -> Details about ‘object‘, use ‘object??‘ for extra details. In [1]:
有人说是权限问题,只要执行一下权限设置语句就OK了,可是我执行了一下的一句权限语句但是还是不OK。
权限设置语句:
chmod g-wx,o-wx ~/.python-eggs
语句执行之后的错误:
wyl@wyl:~/myobject$ python manage.py shell Python 2.7.8 (default, Oct 20 2014, 15:05:19) Type "copyright", "credits" or "license" for more information. IPython 2.3.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython‘s features. %quickref -> Quick reference. help -> Python‘s own help system. object? -> Details about ‘object‘, use ‘object??‘ for extra details. In [1]:
错误确实是不一样了。但是出现以上错误是什么原因呢?
其实到这一步已经没有错误了,这个只是不是python的操作界面而已,这是ipython的操作界面,而且这个比python的操作更人性化,这个还带tab命令补全的功能,是不是很爽啊!
In [3]: fro from frozenset In [3]: from django. django.conf django.forms django.templatetags django.contrib django.http django.test django.core django.middleware django.utils django.db django.shortcuts django.views django.dispatch django.template In [3]: from django.d django.db django.dispatch In [3]: from django.db import conn connection connections In [3]: from django.db import connection In [4]: cursor = connection.cursor() In [5]:
python manage.py shell之后的一些错误:
标签:
原文地址:http://www.cnblogs.com/blogofwyl/p/4412956.html