microsoft / macaw

An Extensible Conversational Information Seeking Platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation on a Mac

Guzpenha opened this issue · comments

Hello,

I have been trying to install macaw on my Mac OS Catalina 10.15.2 (Python 3.7.6).

First I was not able to install indri-5.11.tar.gz. I was only able to do it using the version from this github: https://github.com/diazf/indri. Now Pyindri installation is not working. I get the following message:

Collecting pyndri
Using cached https://files.pythonhosted.org/packages/d6/ee/e1c2f865d5f7471167cbed85c945321cc4842ce245de5a5e374e3b5e4563/pyndri-0.4.tar.gz
Installing collected packages: pyndri
Running setup.py install for pyndri ... error
ERROR: Command errored out with exit status 1:
command: /Users/gustavopenha/personal/macaw/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/mp/hx7qsrv11bl5gm0hfsh2c2840000gn/T/pip-install-pr6bswwt/pyndri/setup.py'"'"'; file='"'"'/private/var/folders/mp/hx7qsrv11bl5gm0hfsh2c2840000gn/T/pip-install-pr6bswwt/pyndri/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/mp/hx7qsrv11bl5gm0hfsh2c2840000gn/T/pip-record-xy5sx3p3/install-record.txt --single-version-externally-managed --compile --install-headers /Users/gustavopenha/personal/macaw/env/include/site/python3.7/pyndri
cwd: /private/var/folders/mp/hx7qsrv11bl5gm0hfsh2c2840000gn/T/pip-install-pr6bswwt/pyndri/
Complete output (256 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.7
creating build/lib.macosx-10.14-x86_64-3.7/pyndri
copying py/compat.py -> build/lib.macosx-10.14-x86_64-3.7/pyndri
copying py/init.py -> build/lib.macosx-10.14-x86_64-3.7/pyndri
copying py/utils.py -> build/lib.macosx-10.14-x86_64-3.7/pyndri
copying py/dictionary.py -> build/lib.macosx-10.14-x86_64-3.7/pyndri
running build_ext
building 'pyndri_ext' extension
creating build/temp.macosx-10.14-x86_64-3.7
creating build/temp.macosx-10.14-x86_64-3.7/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -D_GLIBCXX_USE_CXX11_ABI=0 -DP_NEEDS_GNU_CXX_NAMESPACE=1 -D_FILE_OFFSET_BITS=64 -UNDEBUG -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/Users/gustavopenha/personal/macaw/env/include -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/pyndri.cpp -o build/temp.macosx-10.14-x86_64-3.7/src/pyndri.o
In file included from src/pyndri.cpp:14:
In file included from /usr/local/include/indri/LocalQueryServer.hpp:26:
In file included from /usr/local/include/indri/QueryServer.hpp:22:
In file included from /usr/local/include/indri/QuerySpec.hpp:25:
In file included from /usr/local/include/indri/Packer.hpp:22:
/usr/local/include/indri/XMLNode.hpp:189:18: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare]
if( mainLength != length ) {
~~~~~~~~~~ ^ ~~~~~~
In file included from src/pyndri.cpp:14:
In file included from /usr/local/include/indri/LocalQueryServer.hpp:26:
In file included from /usr/local/include/indri/QueryServer.hpp:22:
/usr/local/include/indri/QuerySpec.hpp:701:9: warning: field '_windowSize' will be initialized after field '_children' [-Wreorder]
_windowSize(windowSize),
^
/usr/local/include/indri/QuerySpec.hpp:1698:16: warning: unused variable 'accumulator' [-Wunused-variable]
UINT64 accumulator = 53;
^
/usr/local/include/indri/QuerySpec.hpp:2712:9: warning: field '_contextSize' will be initialized after field '_terms' [-Wreorder]
_contextSize(0),
^
/usr/local/include/indri/QuerySpec.hpp:3229:9: warning: field '_child' will be initialized after field '_exponent' [-Wreorder]
_child(child),
^
In file included from src/pyndri.cpp:14:
In file included from /usr/local/include/indri/LocalQueryServer.hpp:26:
In file included from /usr/local/include/indri/QueryServer.hpp:23:
In file included from /usr/local/include/indri/InferenceNetwork.hpp:21:
In file included from /usr/local/include/indri/BeliefNode.hpp:22:
In file included from /usr/local/include/indri/InferenceNetworkNode.hpp:23:
In file included from /usr/local/include/indri/Index.hpp:29:
In file included from /usr/local/include/indri/VocabularyIterator.hpp:22:
In file included from /usr/local/include/indri/DiskTermData.hpp:22:
/usr/local/include/lemur/Keyfile.hpp:26:19: warning: field '_handleSize' will be initialized after field '_handle' [-Wreorder]
Keyfile() : _handleSize(0), _handle(NULL) {
^
In file included from src/pyndri.cpp:14:
In file included from /usr/local/include/indri/LocalQueryServer.hpp:26:
In file included from /usr/local/include/indri/QueryServer.hpp:23:
In file included from /usr/local/include/indri/InferenceNetwork.hpp:21:
In file included from /usr/local/include/indri/BeliefNode.hpp:22:
In file included from /usr/local/include/indri/InferenceNetworkNode.hpp:23:
In file included from /usr/local/include/indri/Index.hpp:30:
In file included from /usr/local/include/indri/TermList.hpp:23:
/usr/local/include/indri/FieldExtent.hpp:32:9: warning: field 'number' will be initialized after field 'ordinal' [-Wreorder]
number(_number), ordinal(_ordinal),
^
/usr/local/include/indri/FieldExtent.hpp:32:26: warning: field 'ordinal' will be initialized after field 'parentOrdinal' [-Wreorder]
number(_number), ordinal(_ordinal),
^
/usr/local/include/indri/FieldExtent.hpp:39:9: warning: field 'number' will be initialized after field 'ordinal' [-Wreorder]
number(f.number), ordinal(f.ordinal),
^
/usr/local/include/indri/FieldExtent.hpp:39:27: warning: field 'ordinal' will be initialized after field 'parentOrdinal' [-Wreorder]
number(f.number), ordinal(f.ordinal),
^
In file included from src/pyndri.cpp:14:
In file included from /usr/local/include/indri/LocalQueryServer.hpp:26:
In file included from /usr/local/include/indri/QueryServer.hpp:23:
In file included from /usr/local/include/indri/InferenceNetwork.hpp:23:
/usr/local/include/indri/ListIteratorNode.hpp:47:13: warning: unused variable 'sorted' [-Wunused-variable]
int sorted=0;
^
/usr/local/include/indri/ListIteratorNode.hpp:67:13: warning: unused variable 'sorted' [-Wunused-variable]
int sorted=0;
^
/usr/local/include/indri/ListIteratorNode.hpp:117:25: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
while((_lastpos < exts.size()) && (exts[_lastpos].begin < begin)){
~~~~~~~~ ^ ~~~~~~~~~~~
/usr/local/include/indri/ListIteratorNode.hpp:122:25: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
while((_lastpos < exts.size()) && (exts[_lastpos].begin < end)) {
~~~~~~~~ ^ ~~~~~~~~~~~
In file included from src/pyndri.cpp:14:
In file included from /usr/local/include/indri/LocalQueryServer.hpp:26:
In file included from /usr/local/include/indri/QueryServer.hpp:23:
In file included from /usr/local/include/indri/InferenceNetwork.hpp:25:
In file included from /usr/local/include/indri/Repository.hpp:26:
In file included from /usr/local/include/indri/MemoryIndex.hpp:36:
/usr/local/include/indri/FieldStatistics.hpp:34:9: warning: field 'lastCount' will be initialized after field 'byteOffset' [-Wreorder]
lastCount(0),
^
/usr/local/include/indri/FieldStatistics.hpp:48:9: warning: field 'lastCount' will be initialized after field 'byteOffset' [-Wreorder]
lastCount(0),
^
In file included from src/pyndri.cpp:14:
In file included from /usr/local/include/indri/LocalQueryServer.hpp:26:
In file included from /usr/local/include/indri/QueryServer.hpp:23:
In file included from /usr/local/include/indri/InferenceNetwork.hpp:25:
In file included from /usr/local/include/indri/Repository.hpp:26:
In file included from /usr/local/include/indri/MemoryIndex.hpp:37:
/usr/local/include/indri/CorpusStatistics.hpp:27:43: warning: field 'totalDocuments' will be initialized after field 'baseDocument' [-Wreorder]
CorpusStatistics() : totalTerms(0), totalDocuments(0), baseDocument(0), maximumDocument(0), uniqueTerms(0), maximumDocumentLength(0) {}
^
In file included from src/pyndri.cpp:14:
In file included from /usr/local/include/indri/LocalQueryServer.hpp:26:
In file included from /usr/local/include/indri/QueryServer.hpp:23:
In file included from /usr/local/include/indri/InferenceNetwork.hpp:25:
In file included from /usr/local/include/indri/Repository.hpp:26:
In file included from /usr/local/include/indri/MemoryIndex.hpp:39:
/usr/local/include/indri/ReadersWritersLock.hpp:88:9: warning: field '_tail' will be initialized after field '_head' [-Wreorder]
_tail(0),
^
In file included from src/pyndri.cpp:14:
In file included from /usr/local/include/indri/LocalQueryServer.hpp:26:
In file included from /usr/local/include/indri/QueryServer.hpp:23:
In file included from /usr/local/include/indri/InferenceNetwork.hpp:25:
In file included from /usr/local/include/indri/Repository.hpp:26:
/usr/local/include/indri/MemoryIndex.hpp:57:11: warning: field 'list' will be initialized after field 'next' [-Wreorder]
list(allocator),
^
In file included from src/pyndri.cpp:14:
In file included from /usr/local/include/indri/LocalQueryServer.hpp:26:
In file included from /usr/local/include/indri/QueryServer.hpp:23:
In file included from /usr/local/include/indri/InferenceNetwork.hpp:29:
In file included from /usr/local/include/indri/DocumentStructureHolderNode.hpp:29:
/usr/local/include/indri/DocumentStructure.hpp:50:7: warning: field '_index' will be initialized after field '_numNodes' [-Wreorder]
: _index( &index ) ,
^
/usr/local/include/indri/DocumentStructure.hpp:59:5: warning: field '_index' will be initialized after field '_numNodes' [-Wreorder]
_index( &index ) ,
^
/usr/local/include/indri/DocumentStructure.hpp:67:5: warning: field '_index' will be initialized after field '_numNodes' [-Wreorder]
index( 0 ) ,
^
In file included from src/pyndri.cpp:20:
In file included from /usr/local/include/indri/QueryEnvironment.hpp:25:
/usr/local/include/indri/NetworkStream.hpp:155:29: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
while( bytesWritten < (int) length ) {
~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
src/pyndri.cpp:105:30: warning: conversion from string literal to 'char ' is deprecated [-Wc++11-compat-deprecated-writable-strings]
static char
kwlist[] = {"repository_path", NULL};
^
src/pyndri.cpp:207:17: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
while (item = PyIter_Next(iterator)) {
~~~~~^~~~~~~~~~~~~~~~~~~~~~~
src/pyndri.cpp:207:17: note: place parentheses around the assignment to silence this warning
while (item = PyIter_Next(iterator)) {
^
( )
src/pyndri.cpp:207:17: note: use '==' to turn this assignment into an equality comparison
while (item = PyIter_Next(iterator)) {
^
==
src/pyndri.cpp:470:5: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'UINT64' (aka 'unsigned long long') [-Wsign-compare]
CHECK_EQ(PyDict_Size(token2id), self->index
->uniqueTermCount());
^ ~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pyndri.cpp:33:46: note: expanded from macro 'CHECK_EQ'
#define CHECK_EQ(first, second) assert(first == second)
~~~~~ ^ ~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? _assert_rtn(func, FILE, LINE, #e) : (void)0)
^
src/pyndri.cpp:471:5: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'UINT64' (aka 'unsigned long long') [-Wsign-compare]
CHECK_EQ(PyDict_Size(id2token), self->index
->uniqueTermCount());
^ ~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pyndri.cpp:33:46: note: expanded from macro 'CHECK_EQ'
#define CHECK_EQ(first, second) assert(first == second)
~~~~~ ^ ~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? _assert_rtn(func, FILE, LINE, #e) : (void)0)
^
src/pyndri.cpp:472:5: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'UINT64' (aka 'unsigned long long') [-Wsign-compare]
CHECK_EQ(PyDict_Size(id2df), self->index
->uniqueTermCount());
^ ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pyndri.cpp:33:46: note: expanded from macro 'CHECK_EQ'
#define CHECK_EQ(first, second) assert(first == second)
~~~~~ ^ ~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? _assert_rtn(func, FILE, LINE, #e) : (void)0)
^
src/pyndri.cpp:507:5: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'UINT64' (aka 'unsigned long long') [-Wsign-compare]
CHECK_EQ(PyDict_Size(id2tf), self->index
->uniqueTermCount());
^ ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pyndri.cpp:33:46: note: expanded from macro 'CHECK_EQ'
#define CHECK_EQ(first, second) assert(first == second)
~~~~~ ^ ~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(func, FILE, LINE, #e) : (void)0)
^
src/pyndri.cpp:588:30: warning: conversion from string literal to 'char ' is deprecated [-Wc++11-compat-deprecated-writable-strings]
static char
kwlist[] = {"index", "rules", "baseline",
^
src/pyndri.cpp:588:39: warning: conversion from string literal to 'char ' is deprecated [-Wc++11-compat-deprecated-writable-strings]
static char
kwlist[] = {"index", "rules", "baseline",
^
src/pyndri.cpp:588:48: warning: conversion from string literal to 'char ' is deprecated [-Wc++11-compat-deprecated-writable-strings]
static char
kwlist[] = {"index", "rules", "baseline",
^
src/pyndri.cpp:641:30: warning: conversion from string literal to 'char ' is deprecated [-Wc++11-compat-deprecated-writable-strings]
static char
kwlist[] = {"query_str",
^
src/pyndri.cpp:642:30: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
"document_set",
^
src/pyndri.cpp:643:30: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
"results_requested",
^
src/pyndri.cpp:644:30: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
"include_snippets",
^
src/pyndri.cpp:679:21: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
while (item = PyIter_Next(iterator)) {
~~~~~^~~~~~~~~~~~~~~~~~~~~~~
src/pyndri.cpp:679:21: note: place parentheses around the assignment to silence this warning
while (item = PyIter_Next(iterator)) {
^
( )
src/pyndri.cpp:679:21: note: use '==' to turn this assignment into an equality comparison
while (item = PyIter_Next(iterator)) {
^
==
src/pyndri.cpp:852:30: warning: conversion from string literal to 'char ' is deprecated [-Wc++11-compat-deprecated-writable-strings]
static char
kwlist[] = {"query_env", "fb_docs", "fb_terms", NULL};
^
src/pyndri.cpp:852:43: warning: conversion from string literal to 'char ' is deprecated [-Wc++11-compat-deprecated-writable-strings]
static char
kwlist[] = {"query_env", "fb_docs", "fb_terms", NULL};
^
src/pyndri.cpp:852:54: warning: conversion from string literal to 'char ' is deprecated [-Wc++11-compat-deprecated-writable-strings]
static char
kwlist[] = {"query_env", "fb_docs", "fb_terms", NULL};
^
src/pyndri.cpp:863:16: warning: implicit conversion of NULL constant to 'int' [-Wnull-conversion]
return NULL;
~~~~~~ ^~~~
0
src/pyndri.cpp:868:16: warning: implicit conversion of NULL constant to 'int' [-Wnull-conversion]
return NULL;
~~~~~~ ^~~~
0
src/pyndri.cpp:900:30: warning: conversion from string literal to 'char ' is deprecated [-Wc++11-compat-deprecated-writable-strings]
static char
kwlist[] = {"query_str",
^
src/pyndri.cpp:1114:17: error: expected expression
IndexType = {
^
src/pyndri.cpp:1159:28: error: expected expression
QueryEnvironmentType = {
^
src/pyndri.cpp:1204:25: error: expected expression
QueryExpanderType = {
^
43 warnings and 3 errors generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/gustavopenha/personal/macaw/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/mp/hx7qsrv11bl5gm0hfsh2c2840000gn/T/pip-install-pr6bswwt/pyndri/setup.py'"'"'; file='"'"'/private/var/folders/mp/hx7qsrv11bl5gm0hfsh2c2840000gn/T/pip-install-pr6bswwt/pyndri/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/mp/hx7qsrv11bl5gm0hfsh2c2840000gn/T/pip-record-xy5sx3p3/install-record.txt --single-version-externally-managed --compile --install-headers /Users/gustavopenha/personal/macaw/env/include/site/python3.7/pyndri Check the logs for full command output.

This seems to be a pyndri issue, it's better to ask the question from Christophe in the pyndri repo. BTW, did you install pyndri using pip or by cloning the repo and running the setup file? I recommend the latter.

I tried both, the error is the same. I will ask about this issue there, thanks !

@Guzpenha I am facing similar issue for my Mac. I installed the modified version of Indri from the same repo and now I am not able to install pyindri.

GCC is giving me errors.

/usr/local/include/indri/atomic.hpp:48:13: error: unknown type name '_Atomic_word'
    typedef _Atomic_word value_type;
            ^
/usr/local/include/indri/atomic.hpp:51:6: error: use of undeclared identifier '__gnu_cxx'
     __atomic_add( &variable, 1 );
     ^
/usr/local/include/indri/atomic.hpp:46:26: note: expanded from macro '__atomic_add'
    #define __atomic_add __gnu_cxx::__atomic_add
                         ^
/usr/local/include/indri/atomic.hpp:55:7: error: use of undeclared identifier '__gnu_cxx'
      __atomic_add( &variable, -1 );
      ^

Any solutions for this?

These problems seems to be related to pyndri. Please open an issue in the pyndri repo, as this is irrelevant to macaw's implementation.