catkin / catkin_tools

Command line tools for working with catkin
Apache License 2.0
164 stars 146 forks source link

Problems in installing catkin_tools from source #390

Closed alecive closed 8 years ago

alecive commented 8 years ago

I wanted to install catkin_tools from source because I am having the same issue as #311 . I followed the tutorial in http://catkin-tools.readthedocs.io/en/latest/installing.html , but when I have to do pip install -r requirements.txt --upgrade, this is the output:

baxter@Azarel ~/src/catkin_tools (master) $ pip install -r requirements.txt --upgrade
Requirement already up-to-date: catkin-pkg in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 1))
Requirement already up-to-date: osrf-pycommon in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 2))
Downloading/unpacking pyyaml from https://pypi.python.org/packages/04/60/abfb3a665ee0569b60c89148b7187ddd8a36cb65e254fba945ae1315645d/PyYAML-3.11.zip#md5=89cbc92cda979042533b640b76e6e055 (from -r requirements.txt (line 3))
  Downloading PyYAML-3.11.zip (371kB): 371kB downloaded
  Running setup.py (path:/tmp/pip_build_baxter/pyyaml/setup.py) egg_info for package pyyaml

Downloading/unpacking setuptools from https://pypi.python.org/packages/9f/3e/e4912f33a92257b29c28aa1d7121e8081536d9291d6185a313ecf0d1f8c7/setuptools-24.2.1-py2.py3-none-any.whl#md5=0f82c8556a7946fd34c605e0f9f9651e (from -r requirements.txt (line 4))
  Downloading setuptools-24.2.1-py2.py3-none-any.whl (442kB): 442kB downloaded
Downloading/unpacking sphinxcontrib-ansi (from -r requirements.txt (line 5))
  Downloading sphinxcontrib-ansi-0.6.tar.gz
  Running setup.py (path:/tmp/pip_build_baxter/sphinxcontrib-ansi/setup.py) egg_info for package sphinxcontrib-ansi

    warning: no files found matching 'LICENSE'
Downloading/unpacking sphinxcontrib-programoutput (from -r requirements.txt (line 6))
  Downloading sphinxcontrib-programoutput-0.8.tar.gz
  Running setup.py (path:/tmp/pip_build_baxter/sphinxcontrib-programoutput/setup.py) egg_info for package sphinxcontrib-programoutput

    warning: no files found matching '*.txt' under directory 'tests'
Downloading/unpacking trollius from https://pypi.python.org/packages/6e/72/5940cfb765488cfe1b62883a0d0e5438f4fc17cfefd4fb4654a5982be852/trollius-2.1.tar.gz#md5=0b36ff1057cb5a93befe7d8ef0edcbf8 (from -r requirements.txt (line 7))
  Downloading trollius-2.1.tar.gz (276kB): 276kB downloaded
  Running setup.py (path:/tmp/pip_build_baxter/trollius/setup.py) egg_info for package trollius
    !!! WARNING !!! The Trollius project is now deprecated!

    warning: no files found matching 'release.py'

    !!! WARNING !!! The Trollius project is now deprecated!
Downloading/unpacking Sphinx>=1.0b2 (from sphinxcontrib-ansi->-r requirements.txt (line 5))
  Downloading Sphinx-1.4.5-py2.py3-none-any.whl (1.6MB): 1.6MB downloaded
Requirement already up-to-date: six in /usr/local/lib/python2.7/dist-packages (from trollius->-r requirements.txt (line 7))
Downloading/unpacking futures from https://pypi.python.org/packages/9c/3f/1d818ea03fb2956a2bdfa8f8a3b1319590f0f151a5584a8a3ae45085066c/futures-3.0.5-py2-none-any.whl#md5=968375970768ad7b7838cb07a0d60b44 (from trollius->-r requirements.txt (line 7))
  Downloading futures-3.0.5-py2-none-any.whl
Downloading/unpacking babel>=1.3,!=2.0 (from Sphinx>=1.0b2->sphinxcontrib-ansi->-r requirements.txt (line 5))
  Downloading Babel-2.3.4-py2.py3-none-any.whl (7.1MB): 7.1MB downloaded
Requirement already up-to-date: Jinja2>=2.3 in /usr/local/lib/python2.7/dist-packages (from Sphinx>=1.0b2->sphinxcontrib-ansi->-r requirements.txt (line 5))
Downloading/unpacking alabaster>=0.7,<0.8 (from Sphinx>=1.0b2->sphinxcontrib-ansi->-r requirements.txt (line 5))
  Downloading alabaster-0.7.8-py2.py3-none-any.whl
Downloading/unpacking imagesize (from Sphinx>=1.0b2->sphinxcontrib-ansi->-r requirements.txt (line 5))
  Downloading imagesize-0.7.1-py2.py3-none-any.whl
Downloading/unpacking Pygments>=2.0 (from Sphinx>=1.0b2->sphinxcontrib-ansi->-r requirements.txt (line 5))
  Downloading Pygments-2.1.3-py2.py3-none-any.whl (755kB): 755kB downloaded
Downloading/unpacking snowballstemmer>=1.1 (from Sphinx>=1.0b2->sphinxcontrib-ansi->-r requirements.txt (line 5))
  Downloading snowballstemmer-1.2.1-py2.py3-none-any.whl (64kB): 64kB downloaded
Downloading/unpacking docutils>=0.11 from https://pypi.python.org/packages/37/38/ceda70135b9144d84884ae2fc5886c6baac4edea39550f28bcd144c1234d/docutils-0.12.tar.gz#md5=4622263b62c5c771c03502afa3157768 (from Sphinx>=1.0b2->sphinxcontrib-ansi->-r requirements.txt (line 5))
  Downloading docutils-0.12.tar.gz (1.6MB): 1.6MB downloaded
  Running setup.py (path:/tmp/pip_build_baxter/docutils/setup.py) egg_info for package docutils

    warning: no files found matching 'MANIFEST'
    warning: no files found matching '*' under directory 'extras'
    warning: no previously-included files matching '.cvsignore' found under directory '*'
    warning: no previously-included files matching '*.pyc' found under directory '*'
    warning: no previously-included files matching '*~' found under directory '*'
    warning: no previously-included files matching '.DS_Store' found under directory '*'
Downloading/unpacking pytz>=0a from https://pypi.python.org/packages/ba/c7/3d54cad4fb6cf7bf375d39771e67680ec779a541c68459210fcfdc3ba952/pytz-2016.6.1-py2.py3-none-any.whl#md5=735126cd1c1ddc824b7c94e091d7173e (from babel>=1.3,!=2.0->Sphinx>=1.0b2->sphinxcontrib-ansi->-r requirements.txt (line 5))
  Downloading pytz-2016.6.1-py2.py3-none-any.whl (481kB): 481kB downloaded
Installing collected packages: pyyaml, setuptools, sphinxcontrib-ansi, sphinxcontrib-programoutput, trollius, Sphinx, futures, babel, alabaster, imagesize, Pygments, snowballstemmer, docutils, pytz
  Found existing installation: PyYAML 3.10
    Not uninstalling PyYAML at /usr/lib/python2.7/dist-packages, owned by OS
  Running setup.py install for pyyaml
    checking if libyaml is compilable
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/check_libyaml.c -o build/temp.linux-x86_64-2.7/check_libyaml.o
    build/temp.linux-x86_64-2.7/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory
     #include <yaml.h>
                      ^
    compilation terminated.

    libyaml is not found or a compiler error: forcing --without-libyaml
    (if libyaml is installed correctly, you may need to
     specify the option --include-dirs or uncomment and
     modify the parameter include_dirs in setup.cfg)
    error: could not create '/usr/local/lib/python2.7/dist-packages/yaml': Permission denied
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_baxter/pyyaml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-tPnnIU-record/install-record.txt --single-version-externally-managed --compile:
    running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

creating build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/cyaml.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/resolver.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/events.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/loader.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/composer.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/scanner.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/tokens.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/error.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/nodes.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/parser.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/dumper.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/emitter.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/reader.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/representer.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/serializer.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/constructor.py -> build/lib.linux-x86_64-2.7/yaml

copying lib/yaml/__init__.py -> build/lib.linux-x86_64-2.7/yaml

running build_ext

creating build/temp.linux-x86_64-2.7

checking if libyaml is compilable

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/check_libyaml.c -o build/temp.linux-x86_64-2.7/check_libyaml.o

build/temp.linux-x86_64-2.7/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory

 #include <yaml.h>

                  ^

compilation terminated.

libyaml is not found or a compiler error: forcing --without-libyaml

(if libyaml is installed correctly, you may need to

 specify the option --include-dirs or uncomment and

 modify the parameter include_dirs in setup.cfg)

running install_lib

creating /usr/local/lib/python2.7/dist-packages/yaml

error: could not create '/usr/local/lib/python2.7/dist-packages/yaml': Permission denied

----------------------------------------
  Can't roll back PyYAML; was not uninstalled
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_baxter/pyyaml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-tPnnIU-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_baxter/pyyaml
Storing debug log for failure in /home/baxter/.pip/pip.log

System Info

baxter@Azarel ~/src/catkin_tools (master) $ uname -a
Linux Azarel 3.19.0-64-generic #72~14.04.1-Ubuntu SMP Fri Jun 24 17:59:48 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
baxter@Azarel ~/src/catkin_tools (master) $ python --version
Python 2.7.6
baxter@Azarel ~/src/catkin_tools (master) $ catkin --version
catkin_tools 0.4.2 (C) 2014-2016 Open Source Robotics Foundation
catkin_tools is released under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)

---
Using Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2]
baxter@Azarel ~/src/catkin_tools (master) $ echo $ROS_DISTRO
indigo

(obviously the catkin --version that is shown here is not the one that I'm trying to install from sources :smile: )

wjwwood commented 8 years ago

You're trying to install to the system Python's dist-packages folder but you're not using sudo, see:

error: could not create '/usr/local/lib/python2.7/dist-packages/yaml': Permission denied

Either use sudo with your command or use a virtualenv.

wjwwood commented 8 years ago

The docs mention you might need to use sudo:

Depending on your environment/machine, you may need to use sudo with this command.

Where "this command" is in reference to pip.

alecive commented 8 years ago

Thank you @wjwwood !