V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
bupo
V2EX  ›  Python

python: can't open file 'django-admin.py': [Errno 2] No such file or directory 怎么解决

  •  
  •   bupo · 2012-11-24 15:42:15 +08:00 · 15874 次点击
    这是一个创建于 4169 天前的主题,其中的信息可能已经有所发展或是发生改变。
    django已经安装,之前也通过python django-admin.py startproject xxx创建过项目
    今天就不行了。最后把/usr/local/bin/django-admin.py 拷贝到当前目录,就可以了。
    但是还是很不爽,有没有别的解决方法,不用每次都copy django-admin.py 文件?
    第 1 条附言  ·  2012-11-24 17:40:41 +08:00
    重新安装了django就ok了~~好诡异的问题
    7 条回复    1970-01-01 08:00:00 +08:00
    dreampuf
        1
    dreampuf  
       2012-11-24 16:10:45 +08:00
    python版本变了吧,中间有过其他操作更换了python解释器?
    reorx
        2
    reorx  
       2012-11-24 17:08:25 +08:00
    既然在 /usr/local/bin 里面,为何不直接运行 django-admin.py startproject xxx ?
    freetstar
        3
    freetstar  
       2012-11-24 17:20:59 +08:00
    echo $PATH检查下环境变量,是否包含/usr/local/bin。
    bupo
        4
    bupo  
    OP
       2012-11-24 17:38:38 +08:00
    @dreampuf 没有
    @reorx 也不行
    @freetstart 包含
    aisk
        5
    aisk  
       2012-11-25 13:31:40 +08:00
    难道是./django-admin.py了?
    everyx
        6
    everyx  
       2012-11-25 14:19:04 +08:00
    你的Djnago是怎么安装的,操纵系统是那个?我fedora通过yum安装的话直接有django-admin命令的,直接用就行了,如果是通过pip安装的话也是可以的啊。
    bearcat001
        7
    bearcat001  
       2012-11-25 14:36:24 +08:00
    chmod 777 django-admin.py试试,可能是权限问题
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5245 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 01:15 · PVG 09:15 · LAX 18:15 · JFK 21:15
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.