[ https://issues.apache.org/jira/browse/BEAM-2587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16432701#comment-16432701 ]
Valentyn Tymofieiev commented on BEAM-2587: ------------------------------------------- I saw "DistutilsOptionError: can't combine user with prefix, exec_prefix/home, or install_(plat)base" on Ubuntu 16, with Beam code from head, and looked into this bug to reproduce. Upgrading pip to 9.0.3 with `pip install --upgrade pip` fixed the issue for me. As for this bug, upgrading pip also fixes 'Not in apache git tree' error, but Maven build then fails with: Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (default) on project beam-sdks-python: Execution default of goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check failed: Plugin org.apache.maven.plugins:maven-checkstyle-plugin:2.17 or one of its dependencies could not be resolved: Failure to find org.apache.beam:beam-sdks-java-build-tools:jar:2.1.0-SNAPSHOT in http://repository.apache.org/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of apache.snapshots has elapsed or updates are forced -> [Help 1]. If that's an error with maven configs, then we probably won't fix it for 2.1. > Build fails due to python sdk > ----------------------------- > > Key: BEAM-2587 > URL: https://issues.apache.org/jira/browse/BEAM-2587 > Project: Beam > Issue Type: Bug > Components: sdk-py-core > Affects Versions: 2.1.0 > Reporter: Ahmet Altay > Priority: Major > > Build fails with the following errors when {{mvn clean package}} is used on a > clean Ubuntu 16.04 LTS machine with pip 8.x. The issue is resolved when pip > is upgraded to pip 9.x > "RuntimeError: Not in apache git tree; unable to find proto definitions." > "DistutilsOptionError: can't combine user with prefix, exec_prefix/home, or > install_(plat)base" > We need to understand the issue and maybe add a note about requiring pip 9.x > for development. Note that this does not affect end users using prepackaged > artifacts from central repositories. > cc: [~robertwb] > Script for reproduction: > {code} > #!/bin/bash > set -e > readonly MACHINE_ID=$(hexdump -n 1 -e '"%x"' /dev/random) > readonly MACHINE="${USER}-beam-build-${MACHINE_ID}" > readonly ZONE="us-central1-c" > # provision building machine > echo "Provisioning Build Machine (Ubuntu 16.04 LTS)" > gcloud compute instances create "$MACHINE" \ > --zone="$ZONE" \ > --image-project="ubuntu-os-cloud" \ > --image-family="ubuntu-1604-lts" > # wait for ssh to be ready > echo "Waiting for machine to finish booting" > sleep 30 > # ssh into the machine > # 1. install dependencies as specified by beam readme > # 2. download beam source from github > # 3. build with maven > echo "Downloading and building Apache Beam (release-2.1.0)" > gcloud compute ssh "$MACHINE" --zone="$ZONE" << EOF > sudo apt-get --assume-yes update > sudo apt-get --assume-yes install \ > openjdk-8-jdk \ > maven \ > python-setuptools \ > python-pip > wget https://github.com/apache/beam/archive/release-2.1.0.tar.gz > tar -xzf release-2.1.0.tar.gz > cd beam-release-2.1.0 > mvn clean package > EOF > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)