相关疑难解决方法(0)

Docker-compose 不再构建映像(AttributeError:cython_sources)

我正在构建一个 django-react 站点,突然我的 docker-compose 不再构建,尽管需求或图像版本发生了任何更改。

\n

我的requirements.txt 如下所示:

\n
Django>=3.2.4,<4.0\ndjangorestframework>=3.12.4,<3.14.0\ndjangorestframework-simplejwt>=4.8.0,<5.3.0\npsycopg2>=2.8.6,<2.9\ndrf-spectacular>=0.15.1,<0.30\ndjango-allauth>0.5,<1.0\ndj-rest-auth>=3.0,<4.0\n
Run Code Online (Sandbox Code Playgroud)\n

错误输出:

\n
 => [backend internal] load .dockerignore                                                                                                                                                                  0.0s \n => => transferring context: 234B                                                                                                                                                                          0.0s \n => [backend internal] load build definition from Dockerfile                                                                                                                                               0.0s \n => => transferring dockerfile: 933B                                                                                                                                                                       0.0s \n => [backend internal] load metadata for docker.io/library/python:3.9-alpine3.13                                                                                                                           0.5s \n => [backend 1/6] FROM docker.io/library/python:3.9-alpine3.13@sha256:a7cbd1e7784a35a098cedbc8681b790d35ff6030a5e13f043185e2465003a040                                                                     0.0s \n => [backend internal] load build context                                                                                                                                                                  0.0s \n => => transferring context: 2.53kB                                                                                                                                                                        0.0s \n => CACHED [backend 2/6] WORKDIR …
Run Code Online (Sandbox Code Playgroud)

cython pyyaml docker docker-compose

64
推荐指数
4
解决办法
3万
查看次数

导入 PyYAML、cltk 时出现问题

我刚拿到一台MacBook,克隆了我正在做的项目,然后去设置python环境。创建环境后,我更新了 pip 并尝试使用pip install -r requirements.txt. 给我带来问题的 3 个库是cltkPyYAMLstanza

\n

这是执行后给我的pip install -r requirements.txt

\n
Collecting PyYAML==5.4.1 (from -r requirements.txt (line 56))\n  Using cached PyYAML-5.4.1.tar.gz (175 kB)\n  Installing build dependencies ... done\n  Getting requirements to build wheel ... error\n  error: subprocess-exited-with-error\n  \n  \xc3\x97 Getting requirements to build wheel did not run successfully.\n  \xe2\x94\x82 exit code: 1\n  \xe2\x95\xb0\xe2\x94\x80> [62 lines of output]\n      running egg_info\n      writing lib3/PyYAML.egg-info/PKG-INFO\n      writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt\n      writing …
Run Code Online (Sandbox Code Playgroud)

macos pip setuptools pyyaml pyenv

7
推荐指数
2
解决办法
7665
查看次数

标签 统计

pyyaml ×2

cython ×1

docker ×1

docker-compose ×1

macos ×1

pip ×1

pyenv ×1

setuptools ×1