python - 如何修复 Django Rest API 错误?

标签 python django opencv django-views django-rest-framework

如何修复这个错误?

Traceback (most recent call last): File "C:/Users/HP/Downloads/cv_api/cv_api/manage.py", line 10, in execute_from_command_line(sys.argv)

File "F:\Anaconda2Installation\lib\site-packages\django-1.10.5-py2.7.egg\django\core\management__init__.py", line 367, in execute_from_command_line utility.execute()

File "F:\Anaconda2Installation\lib\site-packages\django-1.10.5-py2.7.egg\django\core\management__init__.py", line 316, in execute settings.INSTALLED_APPS

File "F:\Anaconda2Installation\lib\site-packages\django-1.10.5-py2.7.egg\django\conf__init__.py", line 53, in getattr self._setup(name)

File "F:\Anaconda2Installation\lib\site-packages\django-1.10.5-py2.7.egg\django\conf__init__.py", line 41, in _setup self._wrapped = Settings(settings_module)

File "F:\Anaconda2Installation\lib\site-packages\django-1.10.5-py2.7.egg\django\conf__init__.py", line 97, in init mod = importlib.import_module(self.SETTINGS_MODULE)

File "F:\Anaconda2Installation\lib\importlib__init__.py", line 37, in import_module

import(name)

ImportError: No module named cv_api.settings

最佳答案

您需要将您的settings.py 文件移动到cv_api 目录。

关于python - 如何修复 Django Rest API 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42473069/

相关文章:

python - 通过将Python与OpenCV结合使用无法在Raspberry PI上保存视频

java - 如何从 opencv for java 中的位创建垫子?

python - 在 Mac 上使用 shebang (#!) 运行 python 64

python - 分类指标无法处理连续多输出和多标签指标目标的混合

python - Referer 检查失败(Referer 不安全,而主机安全)

Django 管理员 : How can I override a model verbose_name?

python - 使用 Python OpenCV 裁剪图像的一部分的简单方法是什么

python - Pytorch 中的缓冲区是什么?

python - Pandas 连接交替列

Django:如何修复 RelatedOjbectDoesNotExist 异常?