簡體   English   中英

arm32v7/python 安裝 numpy

[英]arm32v7/python install numpy

我一直在嘗試將numpypandasscipy安裝在舊樹莓派的 ZC5FD214CDD0D2B23B4272E73 圖像中。 當 pip 嘗試安裝它們時,問題就出現了,它需要很長時間(甚至失敗)。 我一直在使用的 Dockerfile 是:

FROM arm32v7/python:3.7-slim-buster

# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1

# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1

# Install pip requirements
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Workdir
WORKDIR /book

# Switching to a non-root user
RUN useradd appuser && chown -R appuser /book
USER appuser

# During debugging, this entry point will be overridden.
CMD [ "jupyter", "notebook", "--no-mathjax", "--no-browser", "--port", "4000"]

我嘗試安裝一些庫,例如build-essentialsgcc等……但它沒有用……在操作系統(Raspberry Pi OS Lite)中安裝這些軟件包非常快,因為 pip 使用了armhf包。 我嘗試的另一個選項是使用raspbian/stretch ,但它帶有 Python 3.5 和scipy需要Python => 3.7 並且安裝 Python 的主要版本會使容器太大(或多或少 1GB)...

那么,有什么辦法可以解決 pip 安裝問題?

太感謝了!

更新:

問題是 pip 沒有在: https://piwheels.org/simple中搜索已編譯的軟件包版本。 所以解決方案只是添加:

RUN pip install --index-url=https://www.piwheels.org/simple --no-cache-dir -r requirements.txt

問題是 pip 沒有在: https://piwheels.org/simple中搜索已編譯的軟件包版本。 所以解決方案只是添加:

RUN pip install --index-url=https://www.piwheels.org/simple --no-cache-dir -r requirements.txt

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM