2016-10-23 86 views
0

DIR我有以下配置安裝PIP3安裝quandl - 返回失敗清洗建立加密

  • 的Ubuntu LTS 16.04
  • 的Python 3.5
  • PIP 8.1.1。
  • CFFI 1.8.3
  • IDE PyCharm 2.3(並不重要,但以防萬一)

我檢查了文章Python的加密封裝的PIP和setup.py - Failed to install Python Cryptography package with PIP and setup.py。似乎什麼都沒有解決。

我模塊的最新版本(setuptools的等)

似乎正在努力建立一個構造函數和發現一些不匹配的版本

  File "/tmp/pip-build-nrsep1ln/cryptography/src/_cffi_src/utils.py", line 69, in build_ffi 
     ffi = FFI() 
    File "/home/alex/.local/lib/python3.5/site-packages/cffi/api.py", line 59, in __init__ 
     "version mismatch, %s != %s" % (backend.__version__, __version__) 
    AssertionError: version mismatch, 1.5.2 != 1.8.3 

     MY SYSTEM HAS 1.8.3 VERSION SEE BELOW 
---------------------------------------------------------------------- 
Collecting cffi - see http://cffi.readthedocs.io/en/latest/installation.html 

    Using cached cffi-1.8.3-cp35-cp35m-manylinux1_x86_64.whl 
Collecting pycparser (from cffi) 
Installing collected packages: pycparser, cffi 
Successfully installed cffi-1.8.3 pycparser-2.16 
------------------------------------------------------ 

就拿記住,我不是OS專家 感謝您的支持

爲PIP 3控制檯命令歷史記錄安裝quandl

pip3 install quandl 
Collecting quandl 
    Using cached Quandl-3.0.1-py2.py3-none-any.whl 
Collecting numpy>=1.8 (from quandl) 
    Using cached numpy-1.11.2-cp35-cp35m-manylinux1_x86_64.whl 
Collecting more-itertools (from quandl) 
Collecting inflection>=0.3.1 (from quandl) 
Collecting pyOpenSSL (from quandl) 
    Using cached pyOpenSSL-16.2.0-py2.py3-none-any.whl 
Collecting six (from quandl) 
    Using cached six-1.10.0-py2.py3-none-any.whl 
Collecting python-dateutil (from quandl) 
    Using cached python_dateutil-2.5.3-py2.py3-none-any.whl 
Collecting pyasn1 (from quandl) 
    Using cached pyasn1-0.1.9-py2.py3-none-any.whl 
Collecting pandas>=0.14 (from quandl) 
    Using cached pandas-0.19.0-cp35-cp35m-manylinux1_x86_64.whl 
Collecting requests>=2.7.0 (from quandl) 
    Using cached requests-2.11.1-py2.py3-none-any.whl 
Collecting ndg-httpsclient (from quandl) 
Collecting cryptography>=1.3.4 (from pyOpenSSL->quandl) 
    Using cached cryptography-1.5.2.tar.gz 
Collecting pytz>=2011k (from pandas>=0.14->quandl) 
    Using cached pytz-2016.7-py2.py3-none-any.whl 
Collecting idna>=2.0 (from cryptography>=1.3.4->pyOpenSSL->quandl) 
    Using cached idna-2.1-py2.py3-none-any.whl 
Collecting setuptools>=11.3 (from cryptography>=1.3.4->pyOpenSSL->quandl) 
    Using cached setuptools-28.6.1-py2.py3-none-any.whl 
Collecting cffi>=1.4.1 (from cryptography>=1.3.4->pyOpenSSL->quandl) 
    Using cached cffi-1.8.3-cp35-cp35m-manylinux1_x86_64.whl 
Collecting pycparser (from cffi>=1.4.1->cryptography>=1.3.4->pyOpenSSL->quandl) 
Building wheels for collected packages: cryptography 
    Running setup.py bdist_wheel for cryptography ... error 
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nrsep1ln/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp79dm6ulvpip-wheel- --python-tag cp35: 
    Traceback (most recent call last): 
    File "<string>", line 1, in <module> 
    File "/tmp/pip-build-nrsep1ln/cryptography/setup.py", line 334, in <module> 
     **keywords_with_side_effects(sys.argv) 
    File "/usr/lib/python3.5/distutils/core.py", line 108, in setup 
     _setup_distribution = dist = klass(attrs) 
    File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 272, in __init__ 
     _Distribution.__init__(self,attrs) 
    File "/usr/lib/python3.5/distutils/dist.py", line 281, in __init__ 
     self.finalize_options() 
    File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 327, in finalize_options 
     ep.load()(self, ep.name, value) 
    File "/home/alex/.local/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 181, in cffi_modules 
     add_cffi_module(dist, cffi_module) 
    File "/home/alex/.local/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 48, in add_cffi_module 
     execfile(build_file_name, mod_vars) 
    File "/home/alex/.local/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 24, in execfile 
     exec(code, glob, glob) 
    File "src/_cffi_src/build_openssl.py", line 81, in <module> 
     extra_link_args=extra_link_args(compiler_type()), 
    File "/tmp/pip-build-nrsep1ln/cryptography/src/_cffi_src/utils.py", line 61, in build_ffi_for_binding 
     extra_link_args=extra_link_args, 
    File "/tmp/pip-build-nrsep1ln/cryptography/src/_cffi_src/utils.py", line 69, in build_ffi 
     ffi = FFI() 
    File "/home/alex/.local/lib/python3.5/site-packages/cffi/api.py", line 59, in __init__ 
     "version mismatch, %s != %s" % (backend.__version__, __version__) 
    AssertionError: version mismatch, 1.5.2 != 1.8.3 

    ---------------------------------------- 
    Failed building wheel for cryptography 
    Running setup.py clean for cryptography 
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nrsep1ln/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" clean --all: 
    Traceback (most recent call last): 
    File "<string>", line 1, in <module> 
    File "/tmp/pip-build-nrsep1ln/cryptography/setup.py", line 334, in <module> 
     **keywords_with_side_effects(sys.argv) 
    File "/usr/lib/python3.5/distutils/core.py", line 108, in setup 
     _setup_distribution = dist = klass(attrs) 
    File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 272, in __init__ 
     _Distribution.__init__(self,attrs) 
    File "/usr/lib/python3.5/distutils/dist.py", line 281, in __init__ 
     self.finalize_options() 
    File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 327, in finalize_options 
     ep.load()(self, ep.name, value) 
    File "/home/alex/.local/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 181, in cffi_modules 
     add_cffi_module(dist, cffi_module) 
    File "/home/alex/.local/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 48, in add_cffi_module 
     execfile(build_file_name, mod_vars) 
    File "/home/alex/.local/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 24, in execfile 
     exec(code, glob, glob) 
    File "src/_cffi_src/build_openssl.py", line 81, in <module> 
     extra_link_args=extra_link_args(compiler_type()), 
    File "/tmp/pip-build-nrsep1ln/cryptography/src/_cffi_src/utils.py", line 61, in build_ffi_for_binding 
     extra_link_args=extra_link_args, 
    File "/tmp/pip-build-nrsep1ln/cryptography/src/_cffi_src/utils.py", line 69, in build_ffi 
     ffi = FFI() 
    File "/home/alex/.local/lib/python3.5/site-packages/cffi/api.py", line 59, in __init__ 
     "version mismatch, %s != %s" % (backend.__version__, __version__) 
    AssertionError: version mismatch, 1.5.2 != 1.8.3 

    ---------------------------------------- 
    Failed cleaning build dir for cryptography 
Failed to build cryptography 
Installing collected packages: numpy, more-itertools, inflection, idna, pyasn1, six, setuptools, pycparser, cffi, cryptography, pyOpenSSL, python-dateutil, pytz, pandas, requests, ndg-httpsclient, quandl 
    Running setup.py install for cryptography ... error 
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nrsep1ln/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-qz2rogd_-record/install-record.txt --single-version-externally-managed --compile --user --prefix=: 
    Traceback (most recent call last): 
     File "<string>", line 1, in <module> 
     File "/tmp/pip-build-nrsep1ln/cryptography/setup.py", line 334, in <module> 
     **keywords_with_side_effects(sys.argv) 
     File "/usr/lib/python3.5/distutils/core.py", line 108, in setup 
     _setup_distribution = dist = klass(attrs) 
     File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 272, in __init__ 
     _Distribution.__init__(self,attrs) 
     File "/usr/lib/python3.5/distutils/dist.py", line 281, in __init__ 
     self.finalize_options() 
     File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 327, in finalize_options 
     ep.load()(self, ep.name, value) 
     File "/home/alex/.local/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 181, in cffi_modules 
     add_cffi_module(dist, cffi_module) 
     File "/home/alex/.local/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 48, in add_cffi_module 
     execfile(build_file_name, mod_vars) 
     File "/home/alex/.local/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 24, in execfile 
     exec(code, glob, glob) 
     File "src/_cffi_src/build_openssl.py", line 81, in <module> 
     extra_link_args=extra_link_args(compiler_type()), 
     File "/tmp/pip-build-nrsep1ln/cryptography/src/_cffi_src/utils.py", line 61, in build_ffi_for_binding 
     extra_link_args=extra_link_args, 
     File "/tmp/pip-build-nrsep1ln/cryptography/src/_cffi_src/utils.py", line 69, in build_ffi 
     ffi = FFI() 
     File "/home/alex/.local/lib/python3.5/site-packages/cffi/api.py", line 59, in __init__ 
     "version mismatch, %s != %s" % (backend.__version__, __version__) 
    AssertionError: version mismatch, 1.5.2 != 1.8.3 

    ---------------------------------------- 
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nrsep1ln/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-qz2rogd_-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-nrsep1ln/cryptography/ 

回答

0

我在Raspberry Pi上運行python(linux也是如此)。

經過一番研究,我發現可能沒有安裝正確的庫,然後安裝quandl,最有可能的是ssl。熊貓和sklearn也許是必要的(當然熊貓)。

sudo apt-get install libssl-dev 

pip install pandas 

pip install sklearn 

如果在此之後它仍然不起作用,請嘗試安裝ffi。在所有其他的東西之後,這是爲我工作的那個。

sudo apt-get install libffi-dev 

這是什麼使它正確地做輪密碼學和ciffi的東西。

使用Pip3命令可能適用於某些人,但並未改變我沒有安裝正確工具的事實。希望這對你有用。

P.S.我也認爲它必須與我一起使用虛擬環境或quandl存儲庫,但這些似乎完全與錯誤無關,因爲它實際上正在嘗試安裝,但只是缺少所需的工具。

+0

已安裝Scikit Learn和pandas。 我會嘗試sudo apt-get install libffi-dev 我的時間有限。在第一個機會,我會嘗試。 感謝您的回答。 PS:在Windows中,它工作正常。 –