简体   繁体   English

在python 3中运行django webapp

[英]running a django webapp in python 3

I am using python 3.3 in a virtualenv in a macosx machine, when I installed django 1.5 alpha release after untarring django 1.5 and running following command 我在解压缩django 1.5并运行以下命令后安装django 1.5 alpha版本时,在macosx机器的virtualenv中使用python 3.3

pip install -e Django-1.5a1

it looks like django is installed, when I run pip freeze 当我运行pip Frozen时,它似乎已安装django

following is the output 以下是输出

Django==1.5a1 
Pygments==1.5
South==0.7.6
bpython==0.11
distribute==0.6.28
django-debug-toolbar==0.9.4
django-extensions==1.0.0
ipython==0.13.1
logilab-astng==0.24.1
logilab-common==0.58.1
pylint==0.26.0

clearly django is installed however import django doesn't seem to be working when I run the following 显然安装了django,但是当我运行以下命令时,导入django似乎不起作用

import django 

in python shell inside virtualenv, the output is 在virtualenv内的python shell中,输出为

No module named import django

what can be the problem with this setup 这个设置可能是什么问题

看来pip无法安装此版本,我使用setup.py,一切似乎都可以正常工作了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM