推荐学习书目
› 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 · Nov 24, 2012 · 17187 views
    This topic created in 5092 days ago, the information mentioned may be changed or developed.
    django已经安装,之前也通过python django-admin.py startproject xxx创建过项目
    今天就不行了。最后把/usr/local/bin/django-admin.py 拷贝到当前目录,就可以了。
    但是还是很不爽,有没有别的解决方法,不用每次都copy django-admin.py 文件?
    Supplement 1  ·  Nov 24, 2012
    重新安装了django就ok了~~好诡异的问题
    7 replies  •  1970-01-01 08:00:00 +08:00
    dreampuf
    dreampuf
    Nov 24, 2012
    1
    python版本变了吧,中间有过其他操作更换了python解释器?
    reorx
    reorx
    Nov 24, 2012
    2
    既然在 /usr/local/bin 里面,为何不直接运行 django-admin.py startproject xxx ?
    freetstar
    freetstar
    Nov 24, 2012
    3
    echo $PATH检查下环境变量,是否包含/usr/local/bin。
    bupo
    bupo
    OP
    Nov 24, 2012
    4
    @dreampuf 没有
    @reorx 也不行
    @freetstart 包含
    aisk
    aisk
    Nov 25, 2012
    5
    难道是./django-admin.py了?
    everyx
    everyx
    Nov 25, 2012
    6
    你的Djnago是怎么安装的,操纵系统是那个?我fedora通过yum安装的话直接有django-admin命令的,直接用就行了,如果是通过pip安装的话也是可以的啊。
    bearcat001
    bearcat001
    Nov 25, 2012
    7
    chmod 777 django-admin.py试试,可能是权限问题
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5251 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 01:30 · PVG 09:30 · LAX 17:30 · JFK 20:30
    ♥ Do have faith in what you're doing.