简体   繁体   English

python:无法打开文件“.manage.py”:[Errno 2] 没有这样的文件或目录

[英]python: can't open file '.manage.py': [Errno 2] No such file or directory

Im learning django and i get this error:我正在学习 django,但出现此错误:

python: can't open file '.manage.py': [Errno 2] No such file or directory

when running跑步时

python .\manage.py makemigrations

I know im running the command in the same folder as my manage.py file, so what can be the issue?我知道我在与 manage.py 文件相同的文件夹中运行命令,那么问题出在哪里?

This is my directory tree:这是我的目录树:

.
├── api
│   ├── admin.py
│   ├── apps.py
│   ├── __init__.py
│   ├── migrations
│   │   └── __init__.py
│   ├── models.py
│   ├── tests.py
│   ├── urls.py
│   └── views.py
├── manage.py
└── music_controller
    ├── asgi.py
    ├── __init__.py
    ├── settings.py
    ├── urls.py
    └── wsgi.py

Here is the pwd where i run above command:这是我在上面运行命令的密码:

(djangotut) ether@ether:~/Documents/django-react-tutorial/music_controller$ 

You don't need to use a backslash in the path.您不需要在路径中使用反斜杠。 The correct command would be: python manage.py makemigrations正确的命令是: python manage.py makemigrations

Naturally you will be using this in the directory where manage.py resides.当然,您将在 manage.py 所在的目录中使用它。

暂无
暂无

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

相关问题 无法打开文件'.manage.py':[Errno 2] 没有这样的文件或目录 - can't open file '.manage.py': [Errno 2] No such file or directory 无法打开文件 'manage.py': [Errno 2] 没有那个文件或目录 - Can't open file 'manage.py': [Errno 2] No such file or directory 内部 Docker 容器 - python:无法打开文件 './services/web/manage.py':[Errno 2] 没有这样的文件或目录 - Inside Docker Container - python: can't open file './services/web/manage.py': [Errno 2] No such file or directory python:无法打开文件“manage.py”:[Errno 2] 没有这样的文件或目录 docker-compose run - python: can't open file 'manage.py': [Errno 2] No such file or directory docker-compose run Docker compose - python:无法打开文件“manage.py”:[Errno 2] 没有这样的文件或目录 - Docker compose - python: can't open file 'manage.py': [Errno 2] No such file or directory docker-web-1 | python:无法打开文件'/code/manage.py':[Errno 2] 没有那个文件或目录 - docker-web-1 | python: can't open file '/code/manage.py': [Errno 2] No such file or directory python: 无法打开文件 'manage.py': [Errno 2] 编写时没有这样的文件或目录 docker - python: can't open file 'manage.py': [Errno 2] No such file or directory when compose docker Django 1.8 python:无法打开文件'manage.py':[Errno 2]没有这样的文件或目录 - Django 1.8 python: can't open file 'manage.py': [Errno 2] No such file or directory windows 10 专业版中的 Docker:python:无法打开文件“manage.py”:[Errno 2] 没有这样的文件或目录 - Docker in windows 10 pro: python: can't open file 'manage.py': [Errno 2] No such file or directory 当运行 docker-compose up 我得到 python: can't open file 'manage.py': [Errno 2] No such file or directory - When run docker-compose up I get python: can't open file 'manage.py': [Errno 2] No such file or directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM