Python 使用pip安装安装alignlib lite时出错

Python 使用pip安装安装alignlib lite时出错,python,linux,bash,pip,Python,Linux,Bash,Pip,我正在尝试安装python软件包,但我遇到了一个错误,无法找到解决方案。有人能帮我吗? 以下是错误消息: tiago@tiago:~/Rscripts$ sudo pip install alignlib-lite The directory '/home/tiago/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Ple

我正在尝试安装python软件包,但我遇到了一个错误,无法找到解决方案。有人能帮我吗? 以下是错误消息:

tiago@tiago:~/Rscripts$ sudo pip install alignlib-lite
The directory '/home/tiago/.cache/pip/http' or its parent directory is      not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/tiago/.cache/pip' or its parent directory is not     owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    Collecting alignlib-lite
  Downloading alignlib-lite-0.2.3.tar.gz (226kB)
100% |████████████████████████████████| 229kB 393kB/s 
Installing collected packages: alignlib-lite
  Running setup.py install for alignlib-lite ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3Y6mrr/alignlib-lite/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-b6OHJX-record/install-record.txt --single-version-externally-managed --compile:
/usr/lib/python2.7/distutils/extension.py:133: UserWarning: Unknown Extension options: 'cmdclass'
  warnings.warn(msg)
running install
running build
running build_ext
cythoning alignlib_lite.pyx to alignlib_lite.cpp
building 'alignlib_lite' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/alignlib_src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Ialignlib_src -I/usr/include/python2.7 -c alignlib_lite.cpp -o build/temp.linux-x86_64-2.7/alignlib_lite.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
alignlib_lite.cpp:256:32: fatal error: boost/shared_ptr.hpp: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

     ----------------------------------------
 Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3Y6mrr/alignlib-lite/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-b6OHJX-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-3Y6mrr/alignlib-lite

“致命错误:boost/shared_ptr.hpp:没有终止此类文件或目录编译。”这意味着您可能没有安装boost库(开发版本)。使用软件包管理器安装boost(或boost-dev,或boost-devel,系统中出现的任何东西)。如果在使用pip安装Python软件包时更经常遇到此类编译器问题,您可能需要查看
conda
。我从未使用过它(我只是单独安装C依赖项),但我知道它是一个Python包管理器,它还可以处理C库依赖项,而不仅仅是Python端。事实上,在安装boost库之后,我可以安装alignlib lite。谢谢