Py学习  »  问与答

[精华] 在win8下startproject后,文件夹是出来了,但是文件夹为空没有东西在里面

dergumwong-weibo • 9 年前 • 7306 次点击  

就是在dos下用的django, python D:\python27\Scripts\django-admin.py startproject firstsite 就是这样,但是文件夹里面没有任何东西

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/760
 
7306 次点击  
文章 [ 8 ]  |  最新文章 9 年前
dergumwong-weibo
Reply   •   1 楼
dergumwong-weibo    9 年前

@Django中国社区 不用了python是2.7.8,刚刚换了1.6.2的django解决了

Py站长
Reply   •   2 楼
Py站长    9 年前

好吧,我在windows7下使用还可以,

你可以使用eclipse 或 pycharm 辅助新建一下试试

dergumwong-weibo
Reply   •   3 楼
dergumwong-weibo    9 年前

@Django中国社区 http://stackoverflow.com/questions/23038212/django-admin-py-startproject-mysite-results-in-an-empty-directory真正的问题是这个,但也没有解决,windows举步维艰

Py站长
Reply   •   4 楼
Py站长    9 年前

@dergumwong-weibo 之前也有人也反应这个问题。

http://django-china.cn/topic/746/

重新安装一下 没准能解决。

dergumwong-weibo
Reply   •   5 楼
dergumwong-weibo    9 年前

@Django中国社区 额,我试了下,stackoverflow上面说的是创建不了project,我的情况是创建了project后,project文件夹是出来了,但里面setting什么的都没有

Py站长
Reply   •   6 楼
Py站长    9 年前

mac 啦,或linux~

dergumwong-weibo
Reply   •   7 楼
dergumwong-weibo    9 年前

@Django中国社区 看来linux才是王道

Py站长
Reply   •   8 楼
Py站长    9 年前

For anyone stumbling across this now, this problem is a result of Windows not obeying the #!C:\Path\To\Virtualenv\Scripts\Python.exe hashbang at the top of django-admin.py, and therefore running it with the wrong python.exe (evidently a virtualenv bug).

However, with virtualenv active, you can use the following command, which will result in the correct python being used, and everything being ok:

python C:\Path\To\Virtualenv\Scripts\django-admin.py startproject <project_name>

是windows8下的一个bug吧,使用上面命令试试

http://stackoverflow.com/questions/3681216/django-admin-py-startproject-is-not-working