6
1

More than 3 years have passed since last update.

django-admin startprojectで「コマンドが見つかりません」の対処法

Posted at

初めに

Django-admin startprojectで表題のエラーで苦戦したため、その備忘録を残しておきます。経験はまだまだ浅いため、間違っていたらごめんなさい。

環境

  • MacOS 10.15
  • python3.7
  • Django3.0

対処法

$ python3 -m Django-admin startproject mysite

パスを通してないとできないかもです。
「python3」、自分の環境に合わせて「python」とかに変えてください。
特に何もしてないと、python→Python2系、python3→Python3系だと思います。
たぶん公式のコマンドのままだとPython2系を使ってるのかな?
以下に問題解決の時に参考にしたページを載せています。

Django公式トラブルシューティング:
https://docs.djangoproject.com/ja/3.0/faq/troubleshooting/

Macを最近使い始めたので、個人的にはPython3のインストールディレクトリを探していろいろするのが辛かったです。
皆さんも頑張ってください!

6
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
6
1