推荐学习书目
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 · 16801 views
    This topic created in 4916 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
        1
    dreampuf  
       Nov 24, 2012
    python版本变了吧,中间有过其他操作更换了python解释器?
    reorx
        2
    reorx  
       Nov 24, 2012
    既然在 /usr/local/bin 里面,为何不直接运行 django-admin.py startproject xxx ?
    freetstar
        3
    freetstar  
       Nov 24, 2012
    echo $PATH检查下环境变量,是否包含/usr/local/bin。
    bupo
        4
    bupo  
    OP
       Nov 24, 2012
    @dreampuf 没有
    @reorx 也不行
    @freetstart 包含
    aisk
        5
    aisk  
       Nov 25, 2012
    难道是./django-admin.py了?
    everyx
        6
    everyx  
       Nov 25, 2012
    你的Djnago是怎么安装的,操纵系统是那个?我fedora通过yum安装的话直接有django-admin命令的,直接用就行了,如果是通过pip安装的话也是可以的啊。
    bearcat001
        7
    bearcat001  
       Nov 25, 2012
    chmod 777 django-admin.py试试,可能是权限问题
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5698 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 65ms · UTC 07:07 · PVG 15:07 · LAX 00:07 · JFK 03:07
    ♥ Do have faith in what you're doing.