小编uma*_*ood的帖子

在 docker compose 中为 django 应用程序使用 YAML 扩展字段时,错误映射键必须是唯一的

你好,我的YAMLMap keys must be unique文件中有这个,我在<<: *commondjango 服务中遇到错误。

version: '3.4'

x-common: &common
  restart: unless-stopped
  networks: docker_django

x-django-build: &django-build
  build:
    context: .
    dockerfile: ./DockerFile.dev

services:

  django:
    <<: *django-build
    <<: *common
    container_name: docker_django_dc01
    command: bash -c "python manage.py runserver 0.0.0.0:8000"
    ports:
      - 8000:8000
    volumes:
      - ./:/code
    depends_on:
      - postgres
Run Code Online (Sandbox Code Playgroud)

django yaml docker

19
推荐指数
1
解决办法
2万
查看次数

无法在 Windows 10 中使用 python 3.10 安装 pyodbc

当我尝试安装 Pyodbc 时出现此错误,我已经安装了 Visual Studio 并且我的计算机中安装了 Microsoft Visual C++ 12 、 15-19 ,但仍然出现此错误。

Running setup.py clean for pyodbc
Failed to build pyodbc
Installing collected packages: sqlparse, pytz, asgiref, pyodbc, Django, Pillow, mssql-django, django-crispy-forms
    Running setup.py install for pyodbc ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\Athar\Desktop\New folder\Project\HeatlhCare\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Athar\\AppData\\Local\\Temp\\pip-install-w0wwm18g\\pyodbc_61963e883a8543fea24a63b1c522bbea\\setup.py'"'"'; __file__='"'"'C:\\Users\\Athar\\AppData\\Local\\Temp\\pip-install-w0wwm18g\\pyodbc_61963e883a8543fea24a63b1c522bbea\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' …
Run Code Online (Sandbox Code Playgroud)

django odbc pyodbc python-3.x

12
推荐指数
1
解决办法
3万
查看次数

标签 统计

django ×2

docker ×1

odbc ×1

pyodbc ×1

python-3.x ×1

yaml ×1