我试图安装python包esutil。 github repo可在此处获取:https://github.com/esheldon/esutil
我正在运行64位Ubuntu 15.04。安装esutil失败了: sudo pip3安装esutil sudo python3 setup.py(在相应的文件夹中)
我可以安装其他软件包,但我的python设置似乎表现得很好。
这是pip安装的错误消息。我花了很长时间试图解析它,但我似乎无法找到任何致命的'错误。任何想法是什么原因?
sudo pip3 install esutil
[sudo] password for sam:
Downloading/unpacking esutil
Downloading esutil-v0.5.2.tar.gz (714kB): 714kB downloaded
Running setup.py (path:/tmp/pip-build-c16wv522/esutil/setup.py) egg_info for package esutil
Requirement already satisfied (use --upgrade to upgrade): numpy in /home/sam/.local/lib/python3.4/site-packages (from esutil)
Installing collected packages: esutil
Running setup.py install for esutil
building 'esutil.recfile._records' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/home/sam/.local/lib/python3.4/site-packages/numpy/core/include -Iesutil/include -Iesutil/htm -Iesutil/htm/htm_src -I/usr/include/python3.4m -c esutil/recfile/records.cpp -o build/temp.linux-x86_64-3.4/esutil/recfile/records.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/sam/.local/lib/python3.4/site-packages/numpy/core/include/numpy/ndarraytypes.h:1804:0,
from /home/sam/.local/lib/python3.4/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from /home/sam/.local/lib/python3.4/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from esutil/recfile/records.hpp:9,
from esutil/recfile/records.cpp:1:
/home/sam/.local/lib/python3.4/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^
In file included from esutil/recfile/records.cpp:1:0:
esutil/recfile/records.hpp:33:1: warning: missing terminating " character
"
^
esutil/recfile/records.hpp:90:1: warning: missing terminating " character
");
^
esutil/recfile/records.hpp:105:3: warning: missing terminating " character
"
^
esutil/recfile/records.hpp:132:56: warning: missing terminating " character
res = robj.Read(rows=rows2get, fields=fields2get)");
^
esutil/recfile/records.hpp:142:3: warning: missing terminating " character
"
^
esutil/recfile/records.hpp:169:3: warning: missing terminating " character
");
^
esutil/recfile/records.hpp:178:3: warning: missing terminating " character
"
^
esutil/recfile/records.hpp:182:3: warning: missing terminating " character
");
^
In file included from /usr/include/locale.h:28:0,
from /usr/include/c++/4.9/clocale:42,
from /usr/include/x86_64-linux-gnu/c++/4.9/bits/c++locale.h:41,
from /usr/include/c++/4.9/bits/localefwd.h:40,
from /usr/include/c++/4.9/ios:41,
from /usr/include/c++/4.9/ostream:38,
from /usr/include/c++/4.9/iostream:39,
from esutil/recfile/records.hpp:2,
from esutil/recfile/records.cpp:1:
esutil/recfile/records.cpp: In constructor ‘Records::Records(PyObject*, const char*, PyObject*, PyObject*, long long int, int)’:
/home/sam/.local/lib/python3.4/site-packages/numpy/core/include/numpy/__multiarray_api.h:1708:35: error: returning a value from a constructor
#define NUMPY_IMPORT_ARRAY_RETVAL NULL
^
/home/sam/.local/lib/python3.4/site-packages/numpy/core/include/numpy/__multiarray_api.h:1713:151: note: in expansion of macro ‘NUMPY_IMPORT_ARRAY_RETVAL’
#define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NUMPY_IMPORT_ARRAY_RETVAL; } }
^
esutil/recfile/records.cpp:10:2: note: in expansion of macro ‘import_array’
import_array();
^
esutil/recfile/records.cpp: In member function ‘void Records::GetFptr(PyObject*, const char*)’:
esutil/recfile/records.cpp:1013:29: error: ‘PyString_Check’ was not declared in this scope
if (PyString_Check(file_obj)) {
^
esutil/recfile/records.cpp:1015:41: error: ‘PyString_AsString’ was not declared in this scope
string fstr=PyString_AsString(file_obj);
^
esutil/recfile/records.cpp:1023:34: error: ‘PyFile_Check’ was not declared in this scope
} else if (PyFile_Check(file_obj)) {
^
esutil/recfile/records.cpp:1025:33: error: ‘PyFile_AsFile’ was not declared in this scope
mFptr = PyFile_AsFile(file_obj);
^
esutil/recfile/records.cpp: In member function ‘void Records::ProcessDelim(PyObject*)’:
esutil/recfile/records.cpp:1042:31: error: ‘PyString_Check’ was not declared in this scope
if (PyString_Check(delim_obj)) {
^
esutil/recfile/records.cpp:1043:40: error: ‘PyString_AsString’ was not declared in this scope
mDelim = PyString_AsString(delim_obj);
^
esutil/recfile/records.cpp: In member function ‘void Records::SubDtype(PyObject*, PyObject*, PyObject**, std::vector<long long int>&)’:
esutil/recfile/records.cpp:1099:39: error: ‘PyString_Check’ was not declared in this scope
} else if (PyString_Check(subnamesobj)) {
^
esutil/recfile/records.cpp: In member function ‘PyObject* Records::FieldDescriptorAsTuple(PyArray_Descr*, const char*)’:
esutil/recfile/records.cpp:1231:28: error: ‘PyString_FromString’ was not declared in this scope
PyString_FromString(name) );
^
esutil/recfile/records.cpp:1249:46: error: ‘PyString_AsString’ was not declared in this scope
<<PyString_AsString(PyTuple_GetItem(tup,0))<<"'"
^
esutil/recfile/records.cpp: In member function ‘void Records::ListStringMatch(std::vector<std::basic_string<char> >, PyObject*, std::vector<long long int>&)’:
esutil/recfile/records.cpp:1319:28: error: ‘PyString_Check’ was not declared in this scope
if (!PyString_Check(item)) {
^
esutil/recfile/records.cpp:1323:39: error: ‘PyString_AsString’ was not declared in this scope
string ts = PyString_AsString(item);
^
esutil/recfile/records.cpp: In member function ‘void Records::PyDictPrintKeys(PyObject*)’:
esutil/recfile/records.cpp:1419:50: error: ‘PyString_AsString’ was not declared in this scope
cout<<"key["<<i<<"] = "<<PyString_AsString(item)<<endl;
^
esutil/recfile/records.cpp: In member function ‘void Records::CopyDescrOrderedNames(PyArray_Descr*)’:
esutil/recfile/records.cpp:1444:38: error: ‘PyString_AS_STRING’ was not declared in this scope
string tname=PyString_AS_STRING(tmp);
^
esutil/recfile/records.cpp: In member function ‘void Records::CopyDescrOrderedOffsets(PyArray_Descr*)’:
esutil/recfile/records.cpp:1494:42: error: ‘PyInt_Check’ was not declared in this scope
if (PyInt_Check(shape) ) {
^
esutil/recfile/records.cpp:1504:60: error: ‘PyInt_AsLong’ was not declared in this scope
mDims[i][ii] = PyInt_AsLong(tmp);
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Complete output from command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-c16wv522/esutil/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-q8_g976u-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.4
creating build/lib.linux-x86_64-3.4/esutil
copying esutil/io.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/oracle_util.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/numpy_util.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/misc.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/__init__.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/json_util.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/plotting.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/sqlite_util.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/random.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/sfile.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/algorithm.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/fits.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/stomp_util.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/xmltools.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/hdfs.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/wcsutil.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/coords.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/ostools.py -> build/lib.linux-x86_64-3.4/esutil
copying esutil/cosmology_purepy.py -> build/lib.linux-x86_64-3.4/esutil
creating build/lib.linux-x86_64-3.4/esutil/recfile
copying esutil/recfile/__init__.py -> build/lib.linux-x86_64-3.4/esutil/recfile
copying esutil/recfile/Util.py -> build/lib.linux-x86_64-3.4/esutil/recfile
copying esutil/recfile/records.py -> build/lib.linux-x86_64-3.4/esutil/recfile
creating build/lib.linux-x86_64-3.4/esutil/cosmology
copying esutil/cosmology/cosmology.py -> build/lib.linux-x86_64-3.4/esutil/cosmology
copying esutil/cosmology/__init__.py -> build/lib.linux-x86_64-3.4/esutil/cosmology
creating build/lib.linux-x86_64-3.4/esutil/htm
copying esutil/htm/__init__.py -> build/lib.linux-x86_64-3.4/esutil/htm
copying esutil/htm/htmc.py -> build/lib.linux-x86_64-3.4/esutil/htm
copying esutil/htm/unit_tests.py -> build/lib.linux-x86_64-3.4/esutil/htm
copying esutil/htm/htm.py -> build/lib.linux-x86_64-3.4/esutil/htm
creating build/lib.linux-x86_64-3.4/esutil/stat
copying esutil/stat/__init__.py -> build/lib.linux-x86_64-3.4/esutil/stat
copying esutil/stat/util.py -> build/lib.linux-x86_64-3.4/esutil/stat
copying esutil/stat/chist.py -> build/lib.linux-x86_64-3.4/esutil/stat
copying esutil/stat/unit_tests.py -> build/lib.linux-x86_64-3.4/esutil/stat
creating build/lib.linux-x86_64-3.4/esutil/integrate
copying esutil/integrate/__init__.py -> build/lib.linux-x86_64-3.4/esutil/integrate
copying esutil/integrate/cgauleg.py -> build/lib.linux-x86_64-3.4/esutil/integrate
copying esutil/integrate/util.py -> build/lib.linux-x86_64-3.4/esutil/integrate
running build_ext
building 'esutil.recfile._records' extension
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/esutil
creating build/temp.linux-x86_64-3.4/esutil/recfile
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/home/sam/.local/lib/python3.4/site-packages/numpy/core/include -Iesutil/include -Iesutil/htm -Iesutil/htm/htm_src -I/usr/include/python3.4m -c esutil/recfile/records.cpp -o build/temp.linux-x86_64-3.4/esutil/recfile/records.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/sam/.local/lib/python3.4/site-packages/numpy/core/include/numpy/ndarraytypes.h:1804:0,
from /home/sam/.local/lib/python3.4/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from /home/sam/.local/lib/python3.4/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from esutil/recfile/records.hpp:9,
from esutil/recfile/records.cpp:1:
/home/sam/.local/lib/python3.4/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^
In file included from esutil/recfile/records.cpp:1:0:
esutil/recfile/records.hpp:33:1: warning: missing terminating " character
"
^
esutil/recfile/records.hpp:90:1: warning: missing terminating " character
");
^
esutil/recfile/records.hpp:105:3: warning: missing terminating " character
"
^
esutil/recfile/records.hpp:132:56: warning: missing terminating " character
res = robj.Read(rows=rows2get, fields=fields2get)");
^
esutil/recfile/records.hpp:142:3: warning: missing terminating " character
"
^
esutil/recfile/records.hpp:169:3: warning: missing terminating " character
");
^
esutil/recfile/records.hpp:178:3: warning: missing terminating " character
"
^
esutil/recfile/records.hpp:182:3: warning: missing terminating " character
");
^
In file included from /usr/include/locale.h:28:0,
from /usr/include/c++/4.9/clocale:42,
from /usr/include/x86_64-linux-gnu/c++/4.9/bits/c++locale.h:41,
from /usr/include/c++/4.9/bits/localefwd.h:40,
from /usr/include/c++/4.9/ios:41,
from /usr/include/c++/4.9/ostream:38,
from /usr/include/c++/4.9/iostream:39,
from esutil/recfile/records.hpp:2,
from esutil/recfile/records.cpp:1:
esutil/recfile/records.cpp: In constructor ‘Records::Records(PyObject*, const char*, PyObject*, PyObject*, long long int, int)’:
/home/sam/.local/lib/python3.4/site-packages/numpy/core/include/numpy/__multiarray_api.h:1708:35: error: returning a value from a constructor
#define NUMPY_IMPORT_ARRAY_RETVAL NULL
^
/home/sam/.local/lib/python3.4/site-packages/numpy/core/include/numpy/__multiarray_api.h:1713:151: note: in expansion of macro ‘NUMPY_IMPORT_ARRAY_RETVAL’
#define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NUMPY_IMPORT_ARRAY_RETVAL; } }
^
esutil/recfile/records.cpp:10:2: note: in expansion of macro ‘import_array’
import_array();
^
esutil/recfile/records.cpp: In member function ‘void Records::GetFptr(PyObject*, const char*)’:
esutil/recfile/records.cpp:1013:29: error: ‘PyString_Check’ was not declared in this scope
if (PyString_Check(file_obj)) {
^
esutil/recfile/records.cpp:1015:41: error: ‘PyString_AsString’ was not declared in this scope
string fstr=PyString_AsString(file_obj);
^
esutil/recfile/records.cpp:1023:34: error: ‘PyFile_Check’ was not declared in this scope
} else if (PyFile_Check(file_obj)) {
^
esutil/recfile/records.cpp:1025:33: error: ‘PyFile_AsFile’ was not declared in this scope
mFptr = PyFile_AsFile(file_obj);
^
esutil/recfile/records.cpp: In member function ‘void Records::ProcessDelim(PyObject*)’:
esutil/recfile/records.cpp:1042:31: error: ‘PyString_Check’ was not declared in this scope
if (PyString_Check(delim_obj)) {
^
esutil/recfile/records.cpp:1043:40: error: ‘PyString_AsString’ was not declared in this scope
mDelim = PyString_AsString(delim_obj);
^
esutil/recfile/records.cpp: In member function ‘void Records::SubDtype(PyObject*, PyObject*, PyObject**, std::vector<long long int>&)’:
esutil/recfile/records.cpp:1099:39: error: ‘PyString_Check’ was not declared in this scope
} else if (PyString_Check(subnamesobj)) {
^
esutil/recfile/records.cpp: In member function ‘PyObject* Records::FieldDescriptorAsTuple(PyArray_Descr*, const char*)’:
esutil/recfile/records.cpp:1231:28: error: ‘PyString_FromString’ was not declared in this scope
PyString_FromString(name) );
^
esutil/recfile/records.cpp:1249:46: error: ‘PyString_AsString’ was not declared in this scope
<<PyString_AsString(PyTuple_GetItem(tup,0))<<"'"
^
esutil/recfile/records.cpp: In member function ‘void Records::ListStringMatch(std::vector<std::basic_string<char> >, PyObject*, std::vector<long long int>&)’:
esutil/recfile/records.cpp:1319:28: error: ‘PyString_Check’ was not declared in this scope
if (!PyString_Check(item)) {
^
esutil/recfile/records.cpp:1323:39: error: ‘PyString_AsString’ was not declared in this scope
string ts = PyString_AsString(item);
^
esutil/recfile/records.cpp: In member function ‘void Records::PyDictPrintKeys(PyObject*)’:
esutil/recfile/records.cpp:1419:50: error: ‘PyString_AsString’ was not declared in this scope
cout<<"key["<<i<<"] = "<<PyString_AsString(item)<<endl;
^
esutil/recfile/records.cpp: In member function ‘void Records::CopyDescrOrderedNames(PyArray_Descr*)’:
esutil/recfile/records.cpp:1444:38: error: ‘PyString_AS_STRING’ was not declared in this scope
string tname=PyString_AS_STRING(tmp);
^
p
esutil/recfile/records.cpp: In member function ‘void Records::CopyDescrOrderedOffsets(PyArray_Descr*)’:
esutil/recfile/records.cpp:1494:42: error: ‘PyInt_Check’ was not declared in this scope
if (PyInt_Check(shape) ) {
^
esutil/recfile/records.cpp:1504:60: error: ‘PyInt_AsLong’ was not declared in this scope
mDims[i][ii] = PyInt_AsLong(tmp);
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-c16wv522/esutil/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-q8_g976u-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-c16wv522/esutil
Storing debug log for failure in /home/sam/.pip/pip.log