简体   繁体   English

命令未找到:django-admin(使用anaconda 3.2.4和pyenv)

[英]Command not found: django-admin (using anaconda 3.2.4 and pyenv)

I'm using Mac OS X El Capitan (10.11.3), pyenv and anaconda 3.2.4 and django 1.8.4 which I installed using the command 我正在使用Mac OS X El Capitan(10.11.3),pyenv和anaconda 3.2.4以及我使用命令安装的django 1.8.4

conda install django

I have tried both django-admin and django-admin.py, and neither have worked. 我已经尝试了django-admin和django-admin.py,但都没有工作。

I have checked the $PATH which is 我检查过$ PATH

/Users/username/.pyenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Oracle/instantclient_11_2

When I look for django-admin.py in my files I can't see anything. 当我在我的文件中查找django-admin.py时,我看不到任何东西。

I have also tried the same for pyenv and Python 3.4.3, with no luck. 我也尝试过pyenv和Python 3.4.3,没有运气。 (I installed django using pip). (我用pip安装了django)。

My suspicion is pyenv is causing the confusion for the $PATH. 我的怀疑是pyenv导致了$ PATH的混乱。

This is my first time using django. 这是我第一次使用django。

1) uninstall Django & Python 1)卸载Django和Python

2) install Python via brew install python 2)通过brew install python

3) install virtualenv , virtualenvwrapper with sudo 3)使用sudo安装virtualenvvirtualenvwrapper

4) install Django with sudo 4)用sudo安装Django

Now you able to use django-admin . 现在你可以使用django-admin The key here is to install Python via brew 这里的关键是通过brew安装Python

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM