teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

お礼追加

2018/10/19 00:56

投稿

Yukiya025
Yukiya025

スコア86

title CHANGED
File without changes
body CHANGED
@@ -58,4 +58,12 @@
58
58
  ) from exc
59
59
  ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
60
60
 
61
- ```
61
+ ```
62
+
63
+ # できましたー(≧∇≦)b
64
+ [matsuand](https://teratail.com/users/matsuand)様、ありがとうございます!
65
+ Djangoがなくなっていたので以下の手順を踏んで`c.question`を無事通過しました<3
66
+
67
+ - もう一度`$ pip install Django`する。
68
+ - `$ python manage.py runserver`で`http://127.0.0.1:8000/polls/`へのアクセス確認
69
+ - 一応[Writing your first Django app, part 2](https://docs.djangoproject.com/en/2.1/intro/tutorial02/)の`$ python manage.py makemigrations polls`から順々に実行

1

回答追記

2018/10/19 00:56

投稿

Yukiya025
Yukiya025

スコア86

title CHANGED
File without changes
body CHANGED
@@ -39,4 +39,23 @@
39
39
  - Django2.1.2
40
40
  # 試したこと
41
41
  [stackoverflow](https://stackoverflow.com/questions/2811075/model-django-poll)で同じエラーの相談がありましたが、私の事例とは違う気がしたので、手助けには今の所なっていませんorz
42
- よろしくお願いしますm(__)m
42
+ よろしくお願いしますm(__)m
43
+
44
+ # 質問回答
45
+ [matsuand](https://teratail.com/users/matsuand)様への回答
46
+ ![mysite](eb3b2fff3c9880e4a29bf791de519e4a.png)
47
+ ```
48
+ ayumka@yukiya:~/PycharmProjects/mysite$ python manage.py sqlmigrate polls 0001
49
+ Traceback (most recent call last):
50
+ File "manage.py", line 8, in <module>
51
+ from django.core.management import execute_from_command_line
52
+ ModuleNotFoundError: No module named 'django'
53
+
54
+ The above exception was the direct cause of the following exception:
55
+
56
+ Traceback (most recent call last):
57
+ File "manage.py", line 14, in <module>
58
+ ) from exc
59
+ ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
60
+
61
+ ```