每当我为python i' m fre错误运行docker文件时
FROM python:3.8-slim-buster
WORKDIR /app
COPY requirements.txt .
RUN pip3 install -r requirements.txt
COPY . .
ENTRYPOINT [ "python3" ]
CMD [ "main.py" ]
错误:
Traceback (most recent call last):
File "main.py", line 6, in <module>
from passbook.models import Pass, Barcode, StoreCard, Location
File "/app/passbook/models.py", line 8, in <module>
from M2Crypto import SMIME
ModuleNotFoundError: No module named 'M2Crypto'
FROM python:3.8-slim-buster
WORKDIR /app
COPY requirements.txt .
RUN pip3 install -r requirements.txt
COPY . .
ENTRYPOINT [ "python3" ]
CMD [ "main.py" ]
Error:
Traceback (most recent call last):
File "main.py", line 6, in <module>
from passbook.models import Pass, Barcode, StoreCard, Location
File "/app/passbook/models.py", line 8, in <module>
from M2Crypto import SMIME
ModuleNotFoundError: No module named 'M2Crypto'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这里安装和运行VENV将是答案,因为错误消息告诉您,它找不到VENV。
尝试这样的事情:
Installing and running the venv would be the answer here, since the error message tells you, it cant find venv.
Try something like this: