[英]Python Django Beginner: can't open manage.py
Trying to get started with Django on pycharm.尝试在 pycharm 上开始使用 Django。
(venv) C:\Users\Vince\PycharmProjects\assignment>python manage.py runserver
But I get this error message whenever i run manage.py:但是每当我运行 manage.py 时,我都会收到此错误消息:
C:\Users\Vince\AppData\Local\Programs\Python\Python37-32\python.exe: can't open file 'manage.py': [Errno 2] No such file or directory C:\Users\Vince\AppData\Local\Programs\Python\Python37-32\python.exe: 无法打开文件 'manage.py': [Errno 2] 没有这样的文件或目录
I do have a django directory opened with a manage.py file in it.我确实打开了一个 django 目录,其中包含一个 manage.py 文件。 Can anyone assist me on what to do?谁能帮助我做什么?
I have tried other solutions, like:我尝试了其他解决方案,例如:
python -vvvvv manage.py runserver
python manage.py migrate
You need to either specify the exact location of the manage.py
file.您需要指定manage.py
文件的确切位置。 Ie: IE:
python3 Users/Vince/Desktop/DjangoProject/manage.py runserver
or cd
to the directory it's in and run from there.或cd
到它所在的目录并从那里运行。
cd Users/Vince/Desktop/DjangoProject
> python manage.py runserver
cd Users/Vince/Desktop/DjangoProject
> python manage.py runserver
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.