我使用LinuxMint并且差不多有一个星期我尝试使用pip3安装为python3安装Quandl但总是遇到同样的错误(甚至尝试安装python2):
$ pip3 install Quandl Collecting Quandl Using cached Quandl-3.0.1-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): requests>=2.7.0 in /usr/lib/python3/dist-packages (from Quandl) Requirement already satisfied (use --upgrade to upgrade): six in ./.local/lib/python3.5/site-packages (from Quandl) Collecting ndg-httpsclient (from Quandl) Using cached ndg_httpsclient-0.4.1.tar.gz Collecting pyOpenSSL (from Quandl) Using cached pyOpenSSL-16.0.0-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): pandas>=0.14 in /usr/local/lib/python3.5/dist-packages (from Quandl) Requirement already satisfied (use --upgrade to upgrade): numpy>=1.8 in ./.local/lib/python3.5/site-packages (from Quandl) Requirement already satisfied (use --upgrade to upgrade): pyasn1 in /usr/lib/python3/dist-packages (from Quandl) Requirement already satisfied (use --upgrade to upgrade): more-itertools in /usr/local/lib/python3.5/dist-packages (from Quandl) Requirement already satisfied (use --upgrade to upgrade): python-dateutil in ./.local/lib/python3.5/site-packages (from Quandl) Requirement already satisfied (use --upgrade to upgrade): inflection>=0.3.1 in /usr/local/lib/python3.5/dist-packages (from Quandl) Collecting cryptography>=1.3 (from pyOpenSSL->Quandl) Using cached cryptography-1.4.tar.gz Requirement already satisfied (use --upgrade to upgrade): pytz>=2011k in ./.local/lib/python3.5/site-packages (from pandas>=0.14->Quandl) Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in /usr/lib/python3/dist-packages (from cryptography>=1.3->pyOpenSSL->Quandl) Requirement already satisfied (use --upgrade to upgrade): setuptools>=11.3 in /usr/lib/python3/dist-packages (from cryptography>=1.3->pyOpenSSL->Quandl) Collecting cffi>=1.4.1 (from cryptography>=1.3->pyOpenSSL->Quandl) Using cached cffi-1.6.0.tar.gz Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/local/lib/python3.5/dist-packages (from cffi>=1.4.1->cryptography>=1.3->pyOpenSSL->Quandl) Installing collected packages: cffi, cryptography, pyOpenSSL, ndg-httpsclient, Quandl Running setup.py install for cffi ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6vc_mid4/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-4apk95_7-record/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 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 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 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 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.5 creating build/lib.linux-x86_64-3.5/cffi copying cffi/gc_weakref.py -> build/lib.linux-x86_64-3.5/cffi copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.5/cffi copying cffi/recompiler.py -> build/lib.linux-x86_64-3.5/cffi copying cffi/__init__.py -> build/lib.linux-x86_64-3.5/cffi copying cffi/commontypes.py -> build/lib.linux-x86_64-3.5/cffi copying cffi/api.py -> build/lib.linux-x86_64-3.5/cffi copying cffi/verifier.py -> build/lib.linux-x86_64-3.5/cffi copying cffi/model.py -> build/lib.linux-x86_64-3.5/cffi copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.5/cffi copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.5/cffi copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.5/cffi copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.5/cffi copying cffi/cparser.py -> build/lib.linux-x86_64-3.5/cffi copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.5/cffi copying cffi/lock.py -> build/lib.linux-x86_64-3.5/cffi copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.5/cffi copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.5/cffi copying cffi/_embedding.h -> build/lib.linux-x86_64-3.5/cffi running build_ext building '_cffi_backend' extension creating build/temp.linux-x86_64-3.5 creating build/temp.linux-x86_64-3.5/c x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.5m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.5/c/_cffi_backend.o c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6vc_mid4/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-4apk95_7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-6vc_mid4/cffi/
使用easy_install安装有效但仅适用于python 2.7