Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install fails on M3 #271

Open
balewski opened this issue Dec 8, 2024 · 1 comment
Open

pip install fails on M3 #271

balewski opened this issue Dec 8, 2024 · 1 comment

Comments

@balewski
Copy link

balewski commented Dec 8, 2024

Hi, can help me with installing mthree inside podman on MacOS Sonoma?
This is my Dockeckerfile

FROM ubuntu:24.04

# Set non-interactive mode for apt-get
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=America/Los_Angeles

RUN echo "1a-AAAAAAAAAAAAAAAAAAAAAAAAAAAAA OS update" && \
    apt-get update && \
    apt-get install -y locales autoconf automake gcc g++ make vim wget ssh openssh-server sudo git emacs aptitude build-essential xterm python3-pip python3-tk python3-scipy python3-dev iputils-ping net-tools screen feh hdf5-tools python3-bitstring plocate graphviz tzdata x11-apps python3-venv && \
    apt-get clean

# Create a virtual environment for Python packages to avoid the externally managed environment issue
RUN python3 -m venv /opt/venv

# Activate the virtual environment
ENV PATH="/opt/venv/bin:$PATH"

RUN /opt/venv/bin/pip install numpy
RUN   /opt/venv/bin/pip install mthree 

The image is build with command:
podman build -f aa -t balewski/junk:p2 .
The crash is:

aarch64-linux-gnu-g++ -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-aarch64-cpython-312/mthree/hamming.o -L/usr/lib/aarch64-linux-gnu -o build/lib.linux-aarch64-cpython-312/mthree/hamming.cpython-312-aarch64-linux-gnu.so
      building 'mthree.matrix' extension
      aarch64-linux-gnu-g++ -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/tmp/pip-build-env-99lc0k15/overlay/lib/python3.12/site-packages/numpy/_core/include -I/opt/venv/include -I/usr/include/python3.12 -c mthree/matrix.cpp -o build/temp.linux-aarch64-cpython-312/mthree/matrix.o -O3 -std=c++17 -DNPY_NO_DEPRECATED_API=NPY_1_23_API_VERSION
      mthree/matrix.cpp:1292:10: fatal error: src/distance.h: No such file or directory
       1292 | #include "src/distance.h"
            |          ^~~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/aarch64-linux-gnu-g++' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for mthree
Failed to build mthree
ERROR: Could not build wheels for mthree, which is required to install pyproject.toml-based projects
Error: building at STEP "RUN /opt/venv/bin/pip install mthree": while running runtime: exit status 1

Thanks
Jan

@nonhermitian
Copy link
Collaborator

I think the header files need to be added to the manifest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants