LoginSignup
4
1

More than 5 years have passed since last update.

django-adminでstartprojectできない時の解決法

Posted at

Djangoでプロジェクトを作成する際に、以下のようなエラーが出ることがあります

$ django-admin startproject idd-corporate-site
Failed to execute process '/usr/local/bin/django-admin'. Reason:
The file '/usr/local/bin/django-admin' specified the interpreter '/usr/local/opt/python/bin/python2.7', which is not an executable command.

Pythonのバージョンに問題がありそうですね。そういうときは、

$ python3 -m django startproject projectname

としてあげればOKです。

それか、先にPython3の仮想環境を作った上でpipでDjangoをインストールしてからdjango-adminを叩くのもあり。てかそれが正当な気がする。

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1