Install pants build tool on Anaconda 1.7.0

351 views Asked by At

I need to install pantsbuild on to an Anaconda python installation of 1.7.0. This is running on CentOS 7 and the Anaconda version cannot change. I have set the PATH so that it points to the Anaconda installation of python. So I cloned the github repo https://github.com/twitter/commons.git and tried to run ./pants. and I get the following output

Bootstrapping pants with requirements pantsbuild.pants==0.0.33
Using /opt/anaconda/bin/python2.7
~/codes/commons/build-support ~/codes/commons
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1572k  100 1572k    0     0  1364k      0  0:00:01  0:00:01 --:--:-- 1372k
virtualenv-1.11.6/
virtualenv-1.11.6/AUTHORS.txt
virtualenv-1.11.6/bin/
virtualenv-1.11.6/bin/rebuild-script.py
virtualenv-1.11.6/docs/
virtualenv-1.11.6/docs/conf.py
virtualenv-1.11.6/docs/index.rst
virtualenv-1.11.6/docs/make.bat
virtualenv-1.11.6/docs/Makefile
virtualenv-1.11.6/docs/news.rst
virtualenv-1.11.6/docs/virtualenv.rst
virtualenv-1.11.6/LICENSE.txt
virtualenv-1.11.6/MANIFEST.in
virtualenv-1.11.6/PKG-INFO
virtualenv-1.11.6/README.rst
virtualenv-1.11.6/scripts/
virtualenv-1.11.6/scripts/virtualenv
virtualenv-1.11.6/setup.cfg
virtualenv-1.11.6/setup.py
virtualenv-1.11.6/virtualenv.egg-info/
virtualenv-1.11.6/virtualenv.egg-info/dependency_links.txt
virtualenv-1.11.6/virtualenv.egg-info/entry_points.txt
virtualenv-1.11.6/virtualenv.egg-info/not-zip-safe
virtualenv-1.11.6/virtualenv.egg-info/PKG-INFO
virtualenv-1.11.6/virtualenv.egg-info/SOURCES.txt
virtualenv-1.11.6/virtualenv.egg-info/top_level.txt
virtualenv-1.11.6/virtualenv.py
virtualenv-1.11.6/virtualenv_embedded/
virtualenv-1.11.6/virtualenv_embedded/activate.bat
virtualenv-1.11.6/virtualenv_embedded/activate.csh
virtualenv-1.11.6/virtualenv_embedded/activate.fish
virtualenv-1.11.6/virtualenv_embedded/activate.ps1
virtualenv-1.11.6/virtualenv_embedded/activate.sh
virtualenv-1.11.6/virtualenv_embedded/activate_this.py
virtualenv-1.11.6/virtualenv_embedded/deactivate.bat
virtualenv-1.11.6/virtualenv_embedded/distutils-init.py
virtualenv-1.11.6/virtualenv_embedded/distutils.cfg
virtualenv-1.11.6/virtualenv_embedded/site.py
virtualenv-1.11.6/virtualenv_support/
virtualenv-1.11.6/virtualenv_support/__init__.py
virtualenv-1.11.6/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl
virtualenv-1.11.6/virtualenv_support/setuptools-3.6-py2.py3-none-any.whl
~/codes/commons
New python executable in /root/codes/commons/build-support/python/../pants.venv/bin/python2.7
Also creating executable in /root/codes/commons/build-support/python/../pants.venv/bin/python
ERROR: The executable /root/codes/commons/build-support/python/../pants.venv/bin/python2.7 is not functioning
ERROR: It thinks sys.prefix is u'/usr' (should be u'/root/codes/commons/build-support/pants.venv')
ERROR: virtualenv is not compatible with this system or executable
build-support/python/libvirtualenv.sh: line 14: /root/codes/commons/build-support/python/../pants.venv/bin/activate: No such file or directory
Requirement already satisfied (use --upgrade to upgrade): pantsbuild.pants.contrib.scrooge==0.0.33 in /opt/anaconda/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): pantsbuild.pants==0.0.33 in /root/.local/lib/python2.7/site-packages/pantsbuild.pants-0.0.33-py2.7.egg
Requirement already satisfied (use --upgrade to upgrade): twitter.common.collections>=0.3.1,<0.4 in /root/.local/lib/python2.7/site-packages/twitter.common.collections-0.3.3-py2.7.egg (from pantsbuild.pants.contrib.scrooge==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): distribute in /opt/anaconda/lib/python2.7/site-packages (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): six==1.8.0 in /root/.local/lib/python2.7/site-packages/six-1.8.0-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.dirutil>=0.3.1,<0.4 in /root/.local/lib/python2.7/site-packages/twitter.common.dirutil-0.3.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.threading>=0.3.1,<0.4 in /root/.local/lib/python2.7/site-packages/twitter.common.threading-0.3.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): requests>=2.5.0,<2.6 in /root/.local/lib/python2.7/site-packages/requests-2.5.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): psutil==1.1.3 in /root/.local/lib/python2.7/site-packages/psutil-1.1.3-py2.7-linux-x86_64.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): ansicolors==1.0.2 in /root/.local/lib/python2.7/site-packages/ansicolors-1.0.2-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): pystache==0.5.3 in /root/.local/lib/python2.7/site-packages/pystache-0.5.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): pex>=0.8.6,<0.8.999999 in /root/.local/lib/python2.7/site-packages/pex-0.8.6-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): docutils>=0.12,<0.13 in /root/.local/lib/python2.7/site-packages/docutils-0.12-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.confluence>=0.3.1,<0.4 in /root/.local/lib/python2.7/site-packages/twitter.common.confluence-0.3.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): Markdown==2.1.1 in /root/.local/lib/python2.7/site-packages/Markdown-2.1.1-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): Pygments==1.4 in /root/.local/lib/python2.7/site-packages/Pygments-1.4-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.util>=0.3.1,<0.4 in /root/.local/lib/python2.7/site-packages/twitter.common.util-0.3.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.config>=0.3.1,<0.4 in /root/.local/lib/python2.7/site-packages/twitter.common.config-0.3.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): lockfile==0.10.2 in /root/.local/lib/python2.7/site-packages/lockfile-0.10.2-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): zincutils==0.3 in /root/.local/lib/python2.7/site-packages/zincutils-0.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): coverage>=3.7,<3.8 in /root/.local/lib/python2.7/site-packages/coverage-3.7.1-py2.7-linux-x86_64.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): pytest>=2.6,<2.7 in /root/.local/lib/python2.7/site-packages/pytest-2.6.4-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): pytest-cov>=1.8,<1.9 in /root/.local/lib/python2.7/site-packages/pytest_cov-1.8.1-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.lang==0.3.3 in /root/.local/lib/python2.7/site-packages/twitter.common.lang-0.3.3-py2.7.egg (from twitter.common.collections>=0.3.1,<0.4->pantsbuild.pants.contrib.scrooge==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.log==0.3.3 in /root/.local/lib/python2.7/site-packages/twitter.common.log-0.3.3-py2.7.egg (from twitter.common.confluence>=0.3.1,<0.4->pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.contextutil==0.3.3 in /root/.local/lib/python2.7/site-packages/twitter.common.contextutil-0.3.3-py2.7.egg (from twitter.common.util>=0.3.1,<0.4->pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.25 in /root/.local/lib/python2.7/site-packages/py-1.4.30-py2.7.egg (from pytest>=2.6,<2.7->pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): cov-core>=1.14.0 in /root/.local/lib/python2.7/site-packages/cov_core-1.15.0-py2.7.egg (from pytest-cov>=1.8,<1.9->pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.options==0.3.3 in /root/.local/lib/python2.7/site-packages/twitter.common.options-0.3.3-py2.7.egg (from twitter.common.log==0.3.3->twitter.common.confluence>=0.3.1,<0.4->pantsbuild.pants==0.0.33)
Cleaning up...
./pants: line 29: exec: pants: not found

I am thinking its a version conflict between virtualenv and Anaconda. I would appreciate any advice to resolve this issue.

Thanks

1

There are 1 answers

2
David Turner On

I would strongly recommend not running anything as root if at all possible.

The important bit of the error message is here:

ERROR: The executable /root/codes/commons/build-support/python/../pants.venv/bin/python2.7 is not functioning
ERROR: It thinks sys.prefix is u'/usr' (should be u'/root/codes/commons/build-support/pants.venv')
ERROR: virtualenv is not compatible with this system or executable

I'm not sure what's different about Anaconda Python, but some Googling does reveal that Anaconda seems to be doing some of what virtualenv does, but differently. So maybe there's a conflict? If you just try installing and running vanilla virtualenv, that might make troubleshooting easier.