导入python django包时出现问题

时间:2013-01-14 09:42:30

标签: python django import module package

我试图解决我在installing django-templated-email中遇到的问题。我认为我的问题是我在我的根文件夹中安装了软件包,因此,经过测试和思考后,我尝试在python文件夹中安装软件包。

正如我所说,我对python很陌生,所以我有很多错误和愚蠢的错误,我仍然需要学习如何解决它们。

在python文件夹中安装软件包之后,我得到的错误是:

ViewDoesNotExist at /
Could not import templated_email.send_email.awards_get. Parent module templated_email.send_email does not exist.
Request Method: GET
Request URL:    http://127.0.0.1:8000/
Django Version: 1.4
Exception Type: ViewDoesNotExist
Exception Value:    
Could not import templated_email.send_email.awards_get. Parent module templated_email.send_email does not exist.
Exception Location: /Library/Python/2.7/site-packages/django/core/urlresolvers.py in get_callable, line 108
Python Executable:  /usr/bin/python
Python Version: 2.7.1
Python Path:    
['/Users/myUser/Folder/MyProyect/proyect',
'/Library/Python/2.7/site-packages/pip-1.0-py2.7.egg',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
'/Library/Python/2.7/site-packages',
'/Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg-info']
Server time:    lun, 14 Ene 2013 10:23:48 +0100

好的,我解决了播种的错误,但我仍然得到:

ImportError at /
No module named django_templated_email
Request Method: GET
Request URL:    http://127.0.0.1:8000/
Django Version: 1.4
Exception Type: ImportError
Exception Value:    
No module named django_templated_email
Exception Location: /Library/Python/2.7/site-packages/django/utils/importlib.py in import_module, line 35
Python Executable:  /usr/bin/python
Python Version: 2.7.1
Python Path:    
['/Users/myUser/Folder/Myproyect/proyect',
'/Library/Python/2.7/site-packages/pip-1.0-py2.7.egg',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
'/Library/Python/2.7/site-packages',
'/Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg-info']

0 个答案:

没有答案