当我尝试安装sasl
时
pypy -m pip install sasl
我收到以下错误
Installing collected packages: sasl
Running setup.py install for sasl ... error
Complete output from command /usr/bin/pypy -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-XAoOSL/sasl/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-2v_K2z/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/sasl
copying sasl/__init__.py -> build/lib.linux-x86_64-2.7/sasl
running egg_info
writing sasl.egg-info/PKG-INFO
writing dependency_links to sasl.egg-info/dependency_links.txt
writing requirements to sasl.egg-info/requires.txt
writing top-level names to sasl.egg-info/top_level.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'sasl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'sasl.egg-info/SOURCES.txt'
copying sasl/saslwrapper.cpp -> build/lib.linux-x86_64-2.7/sasl
copying sasl/saslwrapper.h -> build/lib.linux-x86_64-2.7/sasl
copying sasl/saslwrapper.pyx -> build/lib.linux-x86_64-2.7/sasl
running build_ext
building 'sasl.saslwrapper' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/sasl
cc -O2 -fPIC -Wimplicit -Isasl -I/usr/lib64/pypy-5.0.1/include -c sasl/saslwrapper.cpp -o build/temp.linux-x86_64-2.7/sasl/saslwrapper.o
cc1plus: warning: command line option ‘-Wimplicit’ is valid for C/ObjC but not for C++ [enabled by default]
sasl/saslwrapper.cpp: In function ‘PyObject* __pyx_convert_PyByteArray_string_to_py_std__in_string(const string&)’:
sasl/saslwrapper.cpp:297:98: error: ‘PyByteArray_FromStringAndSize’ was not declared in this scope
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
^
sasl/saslwrapper.cpp:2698:15: note: in expansion of macro ‘__Pyx_PyByteArray_FromStringAndSize’
__pyx_t_1 = __Pyx_PyByteArray_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
^
error: command 'cc' failed with exit status 1
----------------------------------------
Command "/usr/bin/pypy -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-XAoOSL/sasl/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-2v_K2z/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-XAoOSL/sasl/
我正在使用Centos 7(Linux 3.10.0-693.17.1.el7.x86_64)。已安装以下软件包:cyrus-sasl-devel,python-devel,openssl-devel,pypy-devel
> pypy --version
Python 2.7.10 (bbd45126bc691f669c4ebdfbd74456cd274c6b92, Jun 30 2016, 15:15:02) [PyPy 5.0.1 with GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
答案 0 :(得分:1)
PyPy 5.4仅开始支持该功能。我建议您使用PyPy 6.0。此文件可在PyPy项目下载页面https://bitbucket.org/pypy/pypy/downloads
中找到。