Describe the bug
I have a clean install of anaconda and I tried to install allennlp by
pip install allennlp
I got this output:
Collecting allennlp
Using cached https://files.pythonhosted.org/packages/db/98/3b620e6472a240a4451c6daece6ce9d806fde0b0250606f910557a5353f6/allennlp-0.7.1-py3-none-any.whl
Collecting awscli>=1.11.91 (from allennlp)
Using cached https://files.pythonhosted.org/packages/70/8b/16738ab3f1e0292b1d3b71f192227ab07575a216416b0562e74e6aad9c0a/awscli-1.16.47-py2.py3-none-any.whl
Collecting moto==1.3.4 (from allennlp)
Using cached https://files.pythonhosted.org/packages/ee/8f/7b36e81ff067d0e7bf90f7210b351c0cfe6657f79fa4dcb0cb4787462e05/moto-1.3.4-py2.py3-none-any.whl
Requirement already satisfied: conllu==0.11 in ./anaconda3/lib/python3.7/site-packages (from allennlp) (0.11)
Requirement already satisfied: pytest in ./anaconda3/lib/python3.7/site-packages (from allennlp) (3.8.0)
Requirement already satisfied: ftfy in ./anaconda3/lib/python3.7/site-packages (from allennlp) (5.5.0)
Requirement already satisfied: unidecode in ./anaconda3/lib/python3.7/site-packages (from allennlp) (1.0.22)
Requirement already satisfied: overrides in ./anaconda3/lib/python3.7/site-packages (from allennlp) (1.9)
Requirement already satisfied: tensorboardX==1.2 in ./anaconda3/lib/python3.7/site-packages (from allennlp) (1.2)
Collecting boto3 (from allennlp)
Using cached https://files.pythonhosted.org/packages/7a/7e/fe8faa29e771a09c528ee70e1fd9b317006021c48311ecccc78c22ebe739/boto3-1.9.37-py2.py3-none-any.whl
Requirement already satisfied: scikit-learn in ./anaconda3/lib/python3.7/site-packages (from allennlp) (0.19.2)
Requirement already satisfied: pytz==2017.3 in ./anaconda3/lib/python3.7/site-packages (from allennlp) (2017.3)
Requirement already satisfied: nltk in ./anaconda3/lib/python3.7/site-packages (from allennlp) (3.3)
Requirement already satisfied: numpy in ./anaconda3/lib/python3.7/site-packages (from allennlp) (1.15.1)
Requirement already satisfied: sqlparse==0.2.4 in ./anaconda3/lib/python3.7/site-packages (from allennlp) (0.2.4)
Requirement already satisfied: spacy<2.1,>=2.0 in ./anaconda3/lib/python3.7/site-packages (from allennlp) (2.0.16)
Collecting cffi==1.11.2 (from allennlp)
Using cached https://files.pythonhosted.org/packages/c9/70/89b68b6600d479034276fed316e14b9107d50a62f5627da37fafe083fde3/cffi-1.11.2.tar.gz
Requirement already satisfied: responses>=0.7 in ./anaconda3/lib/python3.7/site-packages (from allennlp) (0.10.2)
Requirement already satisfied: tqdm>=4.19 in ./anaconda3/lib/python3.7/site-packages (from allennlp) (4.26.0)
Requirement already satisfied: requests>=2.18 in ./anaconda3/lib/python3.7/site-packages (from allennlp) (2.19.1)
Requirement already satisfied: scipy in ./anaconda3/lib/python3.7/site-packages (from allennlp) (1.1.0)
Requirement already satisfied: gevent==1.3.6 in ./anaconda3/lib/python3.7/site-packages (from allennlp) (1.3.6)
Requirement already satisfied: h5py in ./anaconda3/lib/python3.7/site-packages (from allennlp) (2.8.0)
Requirement already satisfied: parsimonious==0.8.0 in ./anaconda3/lib/python3.7/site-packages (from allennlp) (0.8.0)
Collecting flask-cors==3.0.3 (from allennlp)
Using cached https://files.pythonhosted.org/packages/83/a7/c7243ffd096a491013956c9ee71e2ed0b7d14979fafe89986ca2d30fc6f7/Flask_Cors-3.0.3-py2.py3-none-any.whl
Requirement already satisfied: numpydoc==0.8.0 in ./anaconda3/lib/python3.7/site-packages (from allennlp) (0.8.0)
Requirement already satisfied: jsonnet==0.10.0; sys_platform != "win32" in ./anaconda3/lib/python3.7/site-packages (from allennlp) (0.10.0)
Requirement already satisfied: flask==0.12.4 in ./anaconda3/lib/python3.7/site-packages (from allennlp) (0.12.4)
Requirement already satisfied: flaky in ./anaconda3/lib/python3.7/site-packages (from allennlp) (3.4.0)
Requirement already satisfied: matplotlib==2.2.3 in ./anaconda3/lib/python3.7/site-packages (from allennlp) (2.2.3)
Requirement already satisfied: torch<0.5.0,>=0.4.1 in ./anaconda3/lib/python3.7/site-packages (from allennlp) (0.4.1.post2)
Requirement already satisfied: editdistance in ./anaconda3/lib/python3.7/site-packages (from allennlp) (0.5.2)
Requirement already satisfied: PyYAML<=3.13,>=3.10 in ./anaconda3/lib/python3.7/site-packages (from awscli>=1.11.91->allennlp) (3.13)
Requirement already satisfied: colorama<=0.3.9,>=0.2.5 in ./anaconda3/lib/python3.7/site-packages (from awscli>=1.11.91->allennlp) (0.3.9)
Requirement already satisfied: docutils>=0.10 in ./anaconda3/lib/python3.7/site-packages (from awscli>=1.11.91->allennlp) (0.14)
Collecting rsa<=3.5.0,>=3.1.2 (from awscli>=1.11.91->allennlp)
Using cached https://files.pythonhosted.org/packages/e1/ae/baedc9cb175552e95f3395c43055a6a5e125ae4d48a1d7a924baca83e92e/rsa-3.4.2-py2.py3-none-any.whl
Collecting s3transfer<0.2.0,>=0.1.12 (from awscli>=1.11.91->allennlp)
Using cached https://files.pythonhosted.org/packages/d7/14/2a0004d487464d120c9fb85313a75cd3d71a7506955be458eebfe19a6b1d/s3transfer-0.1.13-py2.py3-none-any.whl
Collecting botocore==1.12.37 (from awscli>=1.11.91->allennlp)
Using cached https://files.pythonhosted.org/packages/d0/35/1461771f778b67984a75a9853a2b3ed25e65a4345e669a81b50c67c930ab/botocore-1.12.37-py2.py3-none-any.whl
Requirement already satisfied: werkzeug in ./anaconda3/lib/python3.7/site-packages (from moto==1.3.4->allennlp) (0.14.1)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in ./anaconda3/lib/python3.7/site-packages (from moto==1.3.4->allennlp) (2.7.3)
Collecting pyaml (from moto==1.3.4->allennlp)
Using cached https://files.pythonhosted.org/packages/17/c1/5892f756109e54ed53c753129b0da4acf6b6add8dff5a85b18667553b16d/pyaml-17.12.1-py2.py3-none-any.whl
Requirement already satisfied: cryptography>=2.0.0 in ./anaconda3/lib/python3.7/site-packages (from moto==1.3.4->allennlp) (2.3.1)
Requirement already satisfied: boto>=2.36.0 in ./anaconda3/lib/python3.7/site-packages (from moto==1.3.4->allennlp) (2.49.0)
Collecting docker>=2.5.1 (from moto==1.3.4->allennlp)
Using cached https://files.pythonhosted.org/packages/c2/76/b8091dc6d9db038af62ae88f228da656a84632cf5d7a84dcf54c613d3fd0/docker-3.5.1-py2.py3-none-any.whl
Collecting mock (from moto==1.3.4->allennlp)
Using cached https://files.pythonhosted.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl
Collecting cookies (from moto==1.3.4->allennlp)
Using cached https://files.pythonhosted.org/packages/6a/60/557f84aa2db629e5124aa05408b975b1b5d0e1cec16cde0bfa06aae097d3/cookies-2.2.1-py2.py3-none-any.whl
Collecting aws-xray-sdk<0.96,>=0.93 (from moto==1.3.4->allennlp)
Using cached https://files.pythonhosted.org/packages/a4/a5/da7887285564f9e0ae5cd25a453cca36e2cd43d8ccc9effde260b4d80904/aws_xray_sdk-0.95-py2.py3-none-any.whl
Requirement already satisfied: Jinja2>=2.7.3 in ./anaconda3/lib/python3.7/site-packages (from moto==1.3.4->allennlp) (2.10)
Collecting xmltodict (from moto==1.3.4->allennlp)
Using cached https://files.pythonhosted.org/packages/42/a9/7e99652c6bc619d19d58cdd8c47560730eb5825d43a7e25db2e1d776ceb7/xmltodict-0.11.0-py2.py3-none-any.whl
Collecting jsondiff==1.1.1 (from moto==1.3.4->allennlp)
Requirement already satisfied: six>1.9 in ./anaconda3/lib/python3.7/site-packages (from moto==1.3.4->allennlp) (1.11.0)
Collecting python-jose<3.0.0 (from moto==1.3.4->allennlp)
Using cached https://files.pythonhosted.org/packages/bf/5c/5fa238c0c5b0656994b52721dd8b1d7bf52ebd8786518dde794f44de86b6/python_jose-2.0.2-py2.py3-none-any.whl
Requirement already satisfied: py>=1.5.0 in ./anaconda3/lib/python3.7/site-packages (from pytest->allennlp) (1.6.0)
Requirement already satisfied: setuptools in ./anaconda3/lib/python3.7/site-packages (from pytest->allennlp) (40.2.0)
Requirement already satisfied: attrs>=17.4.0 in ./anaconda3/lib/python3.7/site-packages (from pytest->allennlp) (18.2.0)
Requirement already satisfied: more-itertools>=4.0.0 in ./anaconda3/lib/python3.7/site-packages (from pytest->allennlp) (4.3.0)
Requirement already satisfied: atomicwrites>=1.0 in ./anaconda3/lib/python3.7/site-packages (from pytest->allennlp) (1.2.1)
Requirement already satisfied: pluggy>=0.7 in ./anaconda3/lib/python3.7/site-packages (from pytest->allennlp) (0.7.1)
Requirement already satisfied: wcwidth in ./anaconda3/lib/python3.7/site-packages (from ftfy->allennlp) (0.1.7)
Requirement already satisfied: protobuf>=0.3.2 in ./anaconda3/lib/python3.7/site-packages (from tensorboardX==1.2->allennlp) (3.6.1)
Collecting jmespath<1.0.0,>=0.7.1 (from boto3->allennlp)
Using cached https://files.pythonhosted.org/packages/b7/31/05c8d001f7f87f0f07289a5fc0fc3832e9a57f2dbd4d3b0fee70e0d51365/jmespath-0.9.3-py2.py3-none-any.whl
Requirement already satisfied: ujson>=1.35 in ./anaconda3/lib/python3.7/site-packages (from spacy<2.1,>=2.0->allennlp) (1.35)
Requirement already satisfied: thinc<6.13.0,>=6.12.0 in ./anaconda3/lib/python3.7/site-packages (from spacy<2.1,>=2.0->allennlp) (6.12.0)
Requirement already satisfied: plac<1.0.0,>=0.9.6 in ./anaconda3/lib/python3.7/site-packages (from spacy<2.1,>=2.0->allennlp) (0.9.6)
Requirement already satisfied: regex==2018.01.10 in ./anaconda3/lib/python3.7/site-packages (from spacy<2.1,>=2.0->allennlp) (2018.1.10)
Requirement already satisfied: preshed<2.1.0,>=2.0.1 in ./anaconda3/lib/python3.7/site-packages (from spacy<2.1,>=2.0->allennlp) (2.0.1)
Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in ./anaconda3/lib/python3.7/site-packages (from spacy<2.1,>=2.0->allennlp) (1.0.1)
Requirement already satisfied: dill<0.3,>=0.2 in ./anaconda3/lib/python3.7/site-packages (from spacy<2.1,>=2.0->allennlp) (0.2.8.2)
Requirement already satisfied: msgpack-numpy<0.4.4 in ./anaconda3/lib/python3.7/site-packages (from spacy<2.1,>=2.0->allennlp) (0.4.3.2)
Requirement already satisfied: cymem<2.1.0,>=2.0.2 in ./anaconda3/lib/python3.7/site-packages (from spacy<2.1,>=2.0->allennlp) (2.0.2)
Requirement already satisfied: pycparser in ./anaconda3/lib/python3.7/site-packages (from cffi==1.11.2->allennlp) (2.18)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./anaconda3/lib/python3.7/site-packages (from requests>=2.18->allennlp) (3.0.4)
Requirement already satisfied: idna<2.8,>=2.5 in ./anaconda3/lib/python3.7/site-packages (from requests>=2.18->allennlp) (2.7)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in ./anaconda3/lib/python3.7/site-packages (from requests>=2.18->allennlp) (1.23)
Requirement already satisfied: certifi>=2017.4.17 in ./anaconda3/lib/python3.7/site-packages (from requests>=2.18->allennlp) (2018.8.24)
Requirement already satisfied: greenlet>=0.4.14 in ./anaconda3/lib/python3.7/site-packages (from gevent==1.3.6->allennlp) (0.4.15)
Requirement already satisfied: sphinx>=1.2.3 in ./anaconda3/lib/python3.7/site-packages (from numpydoc==0.8.0->allennlp) (1.7.9)
Requirement already satisfied: click>=2.0 in ./anaconda3/lib/python3.7/site-packages (from flask==0.12.4->allennlp) (6.7)
Requirement already satisfied: itsdangerous>=0.21 in ./anaconda3/lib/python3.7/site-packages (from flask==0.12.4->allennlp) (0.24)
Requirement already satisfied: cycler>=0.10 in ./anaconda3/lib/python3.7/site-packages (from matplotlib==2.2.3->allennlp) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in ./anaconda3/lib/python3.7/site-packages (from matplotlib==2.2.3->allennlp) (2.2.0)
Requirement already satisfied: kiwisolver>=1.0.1 in ./anaconda3/lib/python3.7/site-packages (from matplotlib==2.2.3->allennlp) (1.0.1)
Requirement already satisfied: pyasn1>=0.1.3 in ./anaconda3/lib/python3.7/site-packages (from rsa<=3.5.0,>=3.1.2->awscli>=1.11.91->allennlp) (0.4.4)
Requirement already satisfied: asn1crypto>=0.21.0 in ./anaconda3/lib/python3.7/site-packages (from cryptography>=2.0.0->moto==1.3.4->allennlp) (0.24.0)
Collecting docker-pycreds>=0.3.0 (from docker>=2.5.1->moto==1.3.4->allennlp)
Using cached https://files.pythonhosted.org/packages/ea/bf/7e70aeebc40407fbdb96fa9f79fc8e4722ea889a99378303e3bcc73f4ab5/docker_pycreds-0.3.0-py2.py3-none-any.whl
Collecting websocket-client>=0.32.0 (from docker>=2.5.1->moto==1.3.4->allennlp)
Using cached https://files.pythonhosted.org/packages/26/2d/f749a5c82f6192d77ed061a38e02001afcba55fe8477336d26a950ab17ce/websocket_client-0.54.0-py2.py3-none-any.whl
Collecting pbr>=0.11 (from mock->moto==1.3.4->allennlp)
Using cached https://files.pythonhosted.org/packages/76/0c/304d968fe010ba7c2ecc1d57e28741ddd3a305439dcf1cdb3b6f896a3c00/pbr-5.1.0-py2.py3-none-any.whl
Requirement already satisfied: wrapt in ./anaconda3/lib/python3.7/site-packages (from aws-xray-sdk<0.96,>=0.93->moto==1.3.4->allennlp) (1.10.11)
Collecting jsonpickle (from aws-xray-sdk<0.96,>=0.93->moto==1.3.4->allennlp)
Using cached https://files.pythonhosted.org/packages/ca/ce/97404d5aeb58e6155c216825c81b50f6eca8a5345c582317ae48391878f8/jsonpickle-1.0-py2.py3-none-any.whl
Requirement already satisfied: MarkupSafe>=0.23 in ./anaconda3/lib/python3.7/site-packages (from Jinja2>=2.7.3->moto==1.3.4->allennlp) (1.0)
Collecting ecdsa<1.0 (from python-jose<3.0.0->moto==1.3.4->allennlp)
Using cached https://files.pythonhosted.org/packages/63/f4/73669d51825516ce8c43b816c0a6b64cd6eb71d08b99820c00792cb42222/ecdsa-0.13-py2.py3-none-any.whl
Collecting pycryptodome<4.0.0,>=3.3.1 (from python-jose<3.0.0->moto==1.3.4->allennlp)
Using cached https://files.pythonhosted.org/packages/6e/87/89e3bc9ba9c3670ea3e8ed0ae1b97bc0452cca04f548624af8a90ac92ac2/pycryptodome-3.7.0-cp37-cp37m-manylinux1_x86_64.whl
Collecting future<1.0 (from python-jose<3.0.0->moto==1.3.4->allennlp)
Requirement already satisfied: cytoolz<0.10,>=0.9.0 in ./anaconda3/lib/python3.7/site-packages (from thinc<6.13.0,>=6.12.0->spacy<2.1,>=2.0->allennlp) (0.9.0.1)
Requirement already satisfied: msgpack<1.0.0,>=0.5.6 in ./anaconda3/lib/python3.7/site-packages (from thinc<6.13.0,>=6.12.0->spacy<2.1,>=2.0->allennlp) (0.5.6)
Requirement already satisfied: Pygments>=2.0 in ./anaconda3/lib/python3.7/site-packages (from sphinx>=1.2.3->numpydoc==0.8.0->allennlp) (2.2.0)
Requirement already satisfied: snowballstemmer>=1.1 in ./anaconda3/lib/python3.7/site-packages (from sphinx>=1.2.3->numpydoc==0.8.0->allennlp) (1.2.1)
Requirement already satisfied: babel!=2.0,>=1.3 in ./anaconda3/lib/python3.7/site-packages (from sphinx>=1.2.3->numpydoc==0.8.0->allennlp) (2.6.0)
Requirement already satisfied: alabaster<0.8,>=0.7 in ./anaconda3/lib/python3.7/site-packages (from sphinx>=1.2.3->numpydoc==0.8.0->allennlp) (0.7.11)
Requirement already satisfied: imagesize in ./anaconda3/lib/python3.7/site-packages (from sphinx>=1.2.3->numpydoc==0.8.0->allennlp) (1.1.0)
Requirement already satisfied: packaging in ./anaconda3/lib/python3.7/site-packages (from sphinx>=1.2.3->numpydoc==0.8.0->allennlp) (17.1)
Requirement already satisfied: sphinxcontrib-websupport in ./anaconda3/lib/python3.7/site-packages (from sphinx>=1.2.3->numpydoc==0.8.0->allennlp) (1.1.0)
Requirement already satisfied: toolz>=0.8.0 in ./anaconda3/lib/python3.7/site-packages (from cytoolz<0.10,>=0.9.0->thinc<6.13.0,>=6.12.0->spacy<2.1,>=2.0->allennlp) (0.9.0)
Building wheels for collected packages: cffi
Running setup.py bdist_wheel for cffi ... error
Complete output from command /mnt/cephfs2/asr/users/ming.tu/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-11bng7n1/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-91pno_hs --python-tag cp37:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containinglibffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containinglibffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/c
gcc -pthread -B /mnt/cephfs2/asr/users/ming.tu/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/mnt/cephfs2/asr/users/ming.tu/anaconda3/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.7/c/_cffi_backend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include
^
compilation terminated.
error: command 'gcc' failed with exit status 1
Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed.
Installing collected packages: rsa, jmespath, botocore, s3transfer, awscli, pyaml, docker-pycreds, websocket-client, docker, pbr, mock, cookies, jsonpickle, aws-xray-sdk, xmltodict, boto3, jsondiff, ecdsa, pycryptodome, future, python-jose, moto, cffi, flask-cors, allennlp
Found existing installation: cffi 1.11.5
Uninstalling cffi-1.11.5:
Successfully uninstalled cffi-1.11.5
Running setup.py install for cffi ... error
Complete output from command /mnt/cephfs2/asr/users/ming.tu/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-11bng7n1/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-p7w_9vxs/install-record.txt --single-version-externally-managed --compile:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containinglibffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containinglibffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.7/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/c
gcc -pthread -B /mnt/cephfs2/asr/users/ming.tu/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/mnt/cephfs2/asr/users/ming.tu/anaconda3/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.7/c/_cffi_backend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Rolling back uninstall of cffi
Command "/mnt/cephfs2/asr/users/ming.tu/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-11bng7n1/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-p7w_9vxs/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-11bng7n1/cffi/
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
To Reproduce
Expected behavior
System (please complete the following information):
Additional context
It's a cluster and I don't have permission to run "sudo apt-get xxx"
This doesn't seem like an allennlp issue, more of an issue with cffi. You're missing libffi on your system. It's probably easier to try installing it via conda, and you can run the following to do so:
conda install libffi
ref: https://anaconda.org/anaconda/libffi
Hope that helps! Closing this as it seems like a issue specific to your system, and not something we can really fix.
This doesn't seem like an allennlp issue, more of an issue with
cffi. You're missinglibffion your system. It's probably easier to try installing it via conda, and you can run the following to do so:conda install libffiref: https://anaconda.org/anaconda/libffi
Hope that helps! Closing this as it seems like a issue specific to your system, and not something we can really fix.
Thanks for the reply. I actually have libffi in anaconda3/pkgs/libffi-3.2.1-hd88cf55_4
But it still gives the same error.
can you check in that path for a folder that contains libffi.pc, and add that directory to the PKG_CONFIG_PATH?
can you check in that path for a folder that contains
libffi.pc, and add that directory to thePKG_CONFIG_PATH?
Wha't weird is that there is no libffi.pc in that folder. I also tried to add that directory to PKG_CONFIG_PATH but it didn't work.
i see a libffi.pc in /home/nfliu/miniconda3/pkgs/libffi-3.2.1-hd88cf55_4/lib/pkgconfig, maybe that helps you?
i see a
libffi.pcin/home/nfliu/miniconda3/pkgs/libffi-3.2.1-hd88cf55_4/lib/pkgconfig, maybe that helps you?
Oh I found libffi.pc under libffi-3.2.1-hd88cf55_4/lib/pkgconfig. Should I add every subfolder in libffi-3.2.1-hd88cf55_4 to PKG_CONFIG_PATH?
i see a
libffi.pcin/home/nfliu/miniconda3/pkgs/libffi-3.2.1-hd88cf55_4/lib/pkgconfig, maybe that helps you?
I have both the libffi.h and libffi.pc exposed to PKG_CONFIG_PATH
/mnt/cephfs2/asr/users/ming.tu/anaconda3/pkgs/libffi-3.2.1-hd88cf55_4/include:/mnt/cephfs2/asr/users/ming.tu/anaconda3/pkgs/libffi-3.2.1-hd88cf55_4/lib/pkgconfig/
But it still gives
gcc -pthread -B /mnt/cephfs2/asr/users/ming.tu/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/opt/anaconda1anaconda2anaconda3/include -I/mnt/cephfs2/asr/users/ming.tu/anaconda3/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.7/c/_cffi_backend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
Got it!
I have to manually add
CFLAGS=-I/mnt/cephfs2/asr/users/ming.tu/anaconda3/pkgs/libffi-3.2.1-hd88cf55_4/include pip install allennlp to avoid the error.
Thanks @nelson-liu and hope this will be helpful to others.
Most helpful comment
Got it!
I have to manually add
CFLAGS=-I/mnt/cephfs2/asr/users/ming.tu/anaconda3/pkgs/libffi-3.2.1-hd88cf55_4/include pip install allennlpto avoid the error.Thanks @nelson-liu and hope this will be helpful to others.