python manage.py shell之後的一些錯誤:

來源:互聯網
上載者:User

標籤:

1. 在執行python manage.py shell之後的一些錯誤:

[email protected]:~/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

語句執行之後的錯誤:

[email protected]:~/myobject$ python manage.py shellPython 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]: frofrom       frozenset  In [3]: from django.django.conf          django.forms         django.templatetagsdjango.contrib       django.http          django.testdjango.core          django.middleware    django.utilsdjango.db            django.shortcuts     django.viewsdjango.dispatch      django.template      In [3]: from django.ddjango.db        django.dispatch  In [3]: from django.db import connconnection   connections  In [3]: from django.db import connectionIn [4]: cursor = connection.cursor()In [5]: 

 

python manage.py shell之後的一些錯誤:

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.