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