I'm currently attempting to build a Python project using Pants. However, when I try to create my PEX files, I get the following error:
<span>):<br><br></span><span>stdout:<br><br></span><span>stderr:<br></span><span>Traceback (most recent call last):<br></span><span> File "<stdin>", line 7, in <module><br></span><span> File "<a href="http://setup.py/" target="_blank" rel="nofollow noopener noreferrer">setup.py</a>", line 61, in <module><br></span><span> _PIP_VERSION = get_distribution('pip').version<br></span><span> File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 553, in get_distribution<br></span><span> File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 427, in get_provider<br></span><span> File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 963, in require<br></span><span> File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 849, in resolve<br></span><span>pkg_resources.DistributionNotFound: The 'pip' distribution was not found and is required by the application<br><br><br></span><span> Invalidated 4 targets.<br></span><span>21:51:56 00:09 [complete]<br></span><span>Exception caught: (<class 'pex.resolver.Untranslateable'>)<br><br></span><span>Exception message: Package SourcePackage(u'file:///opt/atlassian/pipelines/agent/build/.pants.d/python-setup/resolved_requirements/CPython-2.7.9/apache-beam-2.2.0.zip') is not translateable by ChainedTranslator(WheelTranslator, EggTranslator, SourceTranslator)<br><br></span><span> FAILURE<br><br></span><span> **** Failed to install apache-beam-2.2.0 (caused by: NonZeroExit("received exit code 1 during execution of `[u'/usr/bin/python2.7', '-', 'bdist_wheel', '--dist-dir=/tmp/tmpnnAmyB']` while trying to execute `[u'/usr/bin/python2.7', '-', 'bdist_wheel', '--dist-dir=/tmp/tmpnnAmyB']`",)</span>
<span>I have tried to replicate the issue by following the "<a href="https://confluence.atlassian.com/bitbucket/debug-your-pipelines-locally-with-docker-838273569.html" target="_self" rel="nofollow noopener noreferrer">Debug your pipelines locally with Docker</a>" article, but everything works fine; it's only when I'm trying to use Bitbucket Pipelines that I get this error message.</span>
<span>Here are the contents of my `bitbucket-pipelines.yml`, as well:</span>
pipelines:
<span> branches:<br> staging:<br> - step:<br> name: Create PEX files for all tasks<br> script:<br> - pip install pantsbuild.pants==1.3.0<br> - for dir in src/python/*/; do pants binary ${dir}tasks::; done<br> artifacts:<br> - dist/*</span><span>image: python:2.7</span>
<span>Any insight into how I can debug?</span>