Compile error in Linux Anaconda installation
See original GitHub issueI’m trying to install in an Anaconda environment using anaconda3/bin/pip install glove-python
I installed gcc and Cython via conda install -c anaconda
and also tried following the steps set out in issue #96 [https://github.com/maciejkula/glove-python/issues/96#issuecomment-499840851]. In this case, running python3 setup.py install
or make
returns the following:
running install running bdist_egg running egg_info writing glove_python.egg-info/PKG-INFO writing dependency_links to glove_python.egg-info/dependency_links.txt writing requirements to glove_python.egg-info/requires.txt writing top-level names to glove_python.egg-info/top_level.txt reading manifest file 'glove_python.egg-info/SOURCES.txt' writing manifest file 'glove_python.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py running build_ext building 'glove.glove_cython' extension gcc -pthread -B /home/mrim/manniona/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mrim/manniona/anaconda3/include/python3.7m -c glove/glove_cython.c -o build/temp.linux-x86_64-3.7/glove/glove_cython.o -fopenmp -ffast-math -march=native glove/glove_cython.c: In function ‘__pyx_pf_5glove_12glove_cython_fit_vectors._omp_fn.0’: glove/glove_cython.c:2447:29: warning: ‘__pyx_v_word_b’ may be used uninitialized in this function [-Wmaybe-uninitialized] #pragma omp for lastprivate(__pyx_v_count) lastprivate(__pyx_v_entry_weight) lastprivate(__pyx_v_gradient) lastprivate(__pyx_v_i) firstprivate(__pyx_v_j) lastprivate(__pyx_v_j) lastprivate(__pyx_v_learning_rate) lastprivate(__pyx_v_loss) lastprivate(__pyx_v_prediction) lastprivate(__pyx_v_shuffle_index) lastprivate(__pyx_v_word_a) lastprivate(__pyx_v_word_b) schedule(dynamic) ^ glove/glove_cython.c:2333:7: note: ‘__pyx_v_word_b’ was declared here int __pyx_v_word_b; ^ glove/glove_cython.c:2447:29: warning: ‘__pyx_v_word_a’ may be used uninitialized in this function [-Wmaybe-uninitialized] #pragma omp for lastprivate(__pyx_v_count) lastprivate(__pyx_v_entry_weight) lastprivate(__pyx_v_gradient) lastprivate(__pyx_v_i) firstprivate(__pyx_v_j) lastprivate(__pyx_v_j) lastprivate(__pyx_v_learning_rate) lastprivate(__pyx_v_loss) lastprivate(__pyx_v_prediction) lastprivate(__pyx_v_shuffle_index) lastprivate(__pyx_v_word_a) lastprivate(__pyx_v_word_b) schedule(dynamic) ^ glove/glove_cython.c:2332:7: note: ‘__pyx_v_word_a’ was declared here int __pyx_v_word_a; ^ glove/glove_cython.c:2447:29: warning: ‘__pyx_v_shuffle_index’ may be used uninitialized in this function [-Wmaybe-uninitialized] #pragma omp for lastprivate(__pyx_v_count) lastprivate(__pyx_v_entry_weight) lastprivate(__pyx_v_gradient) lastprivate(__pyx_v_i) firstprivate(__pyx_v_j) lastprivate(__pyx_v_j) lastprivate(__pyx_v_learning_rate) lastprivate(__pyx_v_loss) lastprivate(__pyx_v_prediction) lastprivate(__pyx_v_shuffle_index) lastprivate(__pyx_v_word_a) lastprivate(__pyx_v_word_b) schedule(dynamic) ^ glove/glove_cython.c:2342:7: note: ‘__pyx_v_shuffle_index’ was declared here int __pyx_v_shuffle_index; ^ glove/glove_cython.c:2447:29: warning: ‘__pyx_v_prediction’ may be used uninitialized in this function [-Wmaybe-uninitialized] #pragma omp for lastprivate(__pyx_v_count) lastprivate(__pyx_v_entry_weight) lastprivate(__pyx_v_gradient) lastprivate(__pyx_v_i) firstprivate(__pyx_v_j) lastprivate(__pyx_v_j) lastprivate(__pyx_v_learning_rate) lastprivate(__pyx_v_loss) lastprivate(__pyx_v_prediction) lastprivate(__pyx_v_shuffle_index) lastprivate(__pyx_v_word_a) lastprivate(__pyx_v_word_b) schedule(dynamic) ^ glove/glove_cython.c:2337:10: note: ‘__pyx_v_prediction’ was declared here double __pyx_v_prediction; ^ glove/glove_cython.c:2447:29: warning: ‘__pyx_v_loss’ may be used uninitialized in this function [-Wmaybe-uninitialized] #pragma omp for lastprivate(__pyx_v_count) lastprivate(__pyx_v_entry_weight) lastprivate(__pyx_v_gradient) lastprivate(__pyx_v_i) firstprivate(__pyx_v_j) lastprivate(__pyx_v_j) lastprivate(__pyx_v_learning_rate) lastprivate(__pyx_v_loss) lastprivate(__pyx_v_prediction) lastprivate(__pyx_v_shuffle_index) lastprivate(__pyx_v_word_a) lastprivate(__pyx_v_word_b) schedule(dynamic) ^ glove/glove_cython.c:2339:10: note: ‘__pyx_v_loss’ was declared here double __pyx_v_loss; ^ glove/glove_cython.c:2447:29: warning: ‘__pyx_v_learning_rate’ may be used uninitialized in this function [-Wmaybe-uninitialized] #pragma omp for lastprivate(__pyx_v_count) lastprivate(__pyx_v_entry_weight) lastprivate(__pyx_v_gradient) lastprivate(__pyx_v_i) firstprivate(__pyx_v_j) lastprivate(__pyx_v_j) lastprivate(__pyx_v_learning_rate) lastprivate(__pyx_v_loss) lastprivate(__pyx_v_prediction) lastprivate(__pyx_v_shuffle_index) lastprivate(__pyx_v_word_a) lastprivate(__pyx_v_word_b) schedule(dynamic) ^ glove/glove_cython.c:2335:10: note: ‘__pyx_v_learning_rate’ was declared here double __pyx_v_learning_rate; ^ glove/glove_cython.c:2447:29: warning: ‘__pyx_v_i’ may be used uninitialized in this function [-Wmaybe-uninitialized] #pragma omp for lastprivate(__pyx_v_count) lastprivate(__pyx_v_entry_weight) lastprivate(__pyx_v_gradient) lastprivate(__pyx_v_i) firstprivate(__pyx_v_j) lastprivate(__pyx_v_j) lastprivate(__pyx_v_learning_rate) lastprivate(__pyx_v_loss) lastprivate(__pyx_v_prediction) lastprivate(__pyx_v_shuffle_index) lastprivate(__pyx_v_word_a) lastprivate(__pyx_v_word_b) schedule(dynamic) ^ glove/glove_cython.c:2340:7: note: ‘__pyx_v_i’ was declared here int __pyx_v_i; ^ glove/glove_cython.c:2447:29: warning: ‘__pyx_v_gradient’ may be used uninitialized in this function [-Wmaybe-uninitialized] #pragma omp for lastprivate(__pyx_v_count) lastprivate(__pyx_v_entry_weight) lastprivate(__pyx_v_gradient) lastprivate(__pyx_v_i) firstprivate(__pyx_v_j) lastprivate(__pyx_v_j) lastprivate(__pyx_v_learning_rate) lastprivate(__pyx_v_loss) lastprivate(__pyx_v_prediction) lastprivate(__pyx_v_shuffle_index) lastprivate(__pyx_v_word_a) lastprivate(__pyx_v_word_b) schedule(dynamic) ^ glove/glove_cython.c:2336:10: note: ‘__pyx_v_gradient’ was declared here double __pyx_v_gradient; ^ glove/glove_cython.c:2447:29: warning: ‘__pyx_v_entry_weight’ may be used uninitialized in this function [-Wmaybe-uninitialized] #pragma omp for lastprivate(__pyx_v_count) lastprivate(__pyx_v_entry_weight) lastprivate(__pyx_v_gradient) lastprivate(__pyx_v_i) firstprivate(__pyx_v_j) lastprivate(__pyx_v_j) lastprivate(__pyx_v_learning_rate) lastprivate(__pyx_v_loss) lastprivate(__pyx_v_prediction) lastprivate(__pyx_v_shuffle_index) lastprivate(__pyx_v_word_a) lastprivate(__pyx_v_word_b) schedule(dynamic) ^ glove/glove_cython.c:2338:10: note: ‘__pyx_v_entry_weight’ was declared here double __pyx_v_entry_weight; ^ glove/glove_cython.c:2447:29: warning: ‘__pyx_v_count’ may be used uninitialized in this function [-Wmaybe-uninitialized] #pragma omp for lastprivate(__pyx_v_count) lastprivate(__pyx_v_entry_weight) lastprivate(__pyx_v_gradient) lastprivate(__pyx_v_i) firstprivate(__pyx_v_j) lastprivate(__pyx_v_j) lastprivate(__pyx_v_learning_rate) lastprivate(__pyx_v_loss) lastprivate(__pyx_v_prediction) lastprivate(__pyx_v_shuffle_index) lastprivate(__pyx_v_word_a) lastprivate(__pyx_v_word_b) schedule(dynamic) ^ glove/glove_cython.c:2334:10: note: ‘__pyx_v_count’ was declared here double __pyx_v_count; ^ gcc -pthread -shared -B /home/mrim/manniona/anaconda3/compiler_compat -L/home/mrim/manniona/anaconda3/lib -Wl,-rpath=/home/mrim/manniona/anaconda3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/glove/glove_cython.o -o build/lib.linux-x86_64-3.7/glove/glove_cython.cpython-37m-x86_64-linux-gnu.so -fopenmp /home/mrim/manniona/anaconda3/compiler_compat/ld: cannot find -lpthread /home/mrim/manniona/anaconda3/compiler_compat/ld: cannot find -lc collect2: error: ld returned 1 exit status error: command 'gcc' failed with exit status 1
And I still get the following error from anaconda3/bin/pip install glove-python
:
`Collecting glove-python Using cached https://files.pythonhosted.org/packages/3e/79/7e7e548dd9dcb741935d031117f4bed133276c2a047aadad42f1552d1771/glove_python-0.1.0.tar.gz Requirement already satisfied: numpy in ./anaconda3/lib/python3.7/site-packages (from glove-python) (1.17.2) Requirement already satisfied: scipy in ./anaconda3/lib/python3.7/site-packages (from glove-python) (1.3.1) Building wheels for collected packages: glove-python Building wheel for glove-python (setup.py) … error ERROR: Command errored out with exit status 1: command: /home/mrim/manniona/anaconda3/bin/python -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-xqc8h49a/glove-python/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-xqc8h49a/glove-python/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ bdist_wheel -d /tmp/pip-wheel-fskh814v --python-tag cp37 cwd: /tmp/pip-install-xqc8h49a/glove-python/ Complete output (82 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/glove copying glove/corpus.py -> build/lib.linux-x86_64-3.7/glove copying glove/init.py -> build/lib.linux-x86_64-3.7/glove copying glove/glove.py -> build/lib.linux-x86_64-3.7/glove running build_ext building ‘glove.glove_cython’ extension creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/glove gcc -pthread -B /home/mrim/manniona/anaconda3/compiler_compat -Wl,–sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mrim/manniona/anaconda3/include/python3.7m -c glove/glove_cython.c -o build/temp.linux-x86_64-3.7/glove/glove_cython.o -fopenmp -ffast-math -march=native glove/glove_cython.c: In function ‘__Pyx_ExceptionSave’: glove/glove_cython.c:16753:19: error: ‘PyThreadState’ has no member named ‘exc_type’ *type = tstate->exc_type; ^ glove/glove_cython.c:16754:20: error: ‘PyThreadState’ has no member named ‘exc_value’ *value = tstate->exc_value; ^ glove/glove_cython.c:16755:17: error: ‘PyThreadState’ has no member named ‘exc_traceback’ *tb = tstate->exc_traceback; ^ glove/glove_cython.c: In function ‘__Pyx_ExceptionReset’: glove/glove_cython.c:16767:22: error: ‘PyThreadState’ has no member named ‘exc_type’ tmp_type = tstate->exc_type; ^ glove/glove_cython.c:16768:23: error: ‘PyThreadState’ has no member named ‘exc_value’ tmp_value = tstate->exc_value; ^ glove/glove_cython.c:16769:20: error: ‘PyThreadState’ has no member named ‘exc_traceback’ tmp_tb = tstate->exc_traceback; ^ glove/glove_cython.c:16770:11: error: ‘PyThreadState’ has no member named ‘exc_type’ tstate->exc_type = type; ^ glove/glove_cython.c:16771:11: error: ‘PyThreadState’ has no member named ‘exc_value’ tstate->exc_value = value; ^ glove/glove_cython.c:16772:11: error: ‘PyThreadState’ has no member named ‘exc_traceback’ tstate->exc_traceback = tb; ^ glove/glove_cython.c: In function ‘__Pyx_GetException’: glove/glove_cython.c:16815:22: error: ‘PyThreadState’ has no member named ‘exc_type’ tmp_type = tstate->exc_type; ^ glove/glove_cython.c:16816:23: error: ‘PyThreadState’ has no member named ‘exc_value’ tmp_value = tstate->exc_value; ^ glove/glove_cython.c:16817:20: error: ‘PyThreadState’ has no member named ‘exc_traceback’ tmp_tb = tstate->exc_traceback; ^ glove/glove_cython.c:16818:11: error: ‘PyThreadState’ has no member named ‘exc_type’ tstate->exc_type = local_type; ^ glove/glove_cython.c:16819:11: error: ‘PyThreadState’ has no member named ‘exc_value’ tstate->exc_value = local_value; ^ glove/glove_cython.c:16820:11: error: ‘PyThreadState’ has no member named ‘exc_traceback’ tstate->exc_traceback = local_tb; ^ glove/glove_cython.c: In function ‘__Pyx_ExceptionSwap’: glove/glove_cython.c:16842:22: error: ‘PyThreadState’ has no member named ‘exc_type’ tmp_type = tstate->exc_type; ^ glove/glove_cython.c:16843:23: error: ‘PyThreadState’ has no member named ‘exc_value’ tmp_value = tstate->exc_value; ^ glove/glove_cython.c:16844:20: error: ‘PyThreadState’ has no member named ‘exc_traceback’ tmp_tb = tstate->exc_traceback; ^ glove/glove_cython.c:16845:11: error: ‘PyThreadState’ has no member named ‘exc_type’ tstate->exc_type = *type; ^ glove/glove_cython.c:16846:11: error: ‘PyThreadState’ has no member named ‘exc_value’ tstate->exc_value = *value; ^ glove/glove_cython.c:16847:11: error: ‘PyThreadState’ has no member named ‘exc_traceback’ tstate->exc_traceback = *tb; ^ error: command ‘gcc’ failed with exit status 1
ERROR: Failed building wheel for glove-python Running setup.py clean for glove-python ERROR: Command errored out with exit status 1: command: /home/mrim/manniona/anaconda3/bin/python -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-xqc8h49a/glove-python/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-xqc8h49a/glove-python/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ clean --all cwd: /tmp/pip-install-xqc8h49a/glove-python Complete output (6 lines): usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] …] or: setup.py --help [cmd1 cmd2 …] or: setup.py --help-commands or: setup.py cmd --help
error: option --all not recognized
ERROR: Failed cleaning build dir for glove-python Failed to build glove-python Installing collected packages: glove-python Running setup.py install for glove-python … error ERROR: Command errored out with exit status 1: command: /home/mrim/manniona/anaconda3/bin/python -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-xqc8h49a/glove-python/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-xqc8h49a/glove-python/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-orwjmsvp/install-record.txt --single-version-externally-managed --compile cwd: /tmp/pip-install-xqc8h49a/glove-python/ Complete output (74 lines): running install running build running build_py running build_ext building ‘glove.glove_cython’ extension gcc -pthread -B /home/mrim/manniona/anaconda3/compiler_compat -Wl,–sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mrim/manniona/anaconda3/include/python3.7m -c glove/glove_cython.c -o build/temp.linux-x86_64-3.7/glove/glove_cython.o -fopenmp -ffast-math -march=native glove/glove_cython.c: In function ‘__Pyx_ExceptionSave’: glove/glove_cython.c:16753:19: error: ‘PyThreadState’ has no member named ‘exc_type’ *type = tstate->exc_type; ^ glove/glove_cython.c:16754:20: error: ‘PyThreadState’ has no member named ‘exc_value’ *value = tstate->exc_value; ^ glove/glove_cython.c:16755:17: error: ‘PyThreadState’ has no member named ‘exc_traceback’ *tb = tstate->exc_traceback; ^ glove/glove_cython.c: In function ‘__Pyx_ExceptionReset’: glove/glove_cython.c:16767:22: error: ‘PyThreadState’ has no member named ‘exc_type’ tmp_type = tstate->exc_type; ^ glove/glove_cython.c:16768:23: error: ‘PyThreadState’ has no member named ‘exc_value’ tmp_value = tstate->exc_value; ^ glove/glove_cython.c:16769:20: error: ‘PyThreadState’ has no member named ‘exc_traceback’ tmp_tb = tstate->exc_traceback; ^ glove/glove_cython.c:16770:11: error: ‘PyThreadState’ has no member named ‘exc_type’ tstate->exc_type = type; ^ glove/glove_cython.c:16771:11: error: ‘PyThreadState’ has no member named ‘exc_value’ tstate->exc_value = value; ^ glove/glove_cython.c:16772:11: error: ‘PyThreadState’ has no member named ‘exc_traceback’ tstate->exc_traceback = tb; ^ glove/glove_cython.c: In function ‘__Pyx_GetException’: glove/glove_cython.c:16815:22: error: ‘PyThreadState’ has no member named ‘exc_type’ tmp_type = tstate->exc_type; ^ glove/glove_cython.c:16816:23: error: ‘PyThreadState’ has no member named ‘exc_value’ tmp_value = tstate->exc_value; ^ glove/glove_cython.c:16817:20: error: ‘PyThreadState’ has no member named ‘exc_traceback’ tmp_tb = tstate->exc_traceback; ^ glove/glove_cython.c:16818:11: error: ‘PyThreadState’ has no member named ‘exc_type’ tstate->exc_type = local_type; ^ glove/glove_cython.c:16819:11: error: ‘PyThreadState’ has no member named ‘exc_value’ tstate->exc_value = local_value; ^ glove/glove_cython.c:16820:11: error: ‘PyThreadState’ has no member named ‘exc_traceback’ tstate->exc_traceback = local_tb; ^ glove/glove_cython.c: In function ‘__Pyx_ExceptionSwap’: glove/glove_cython.c:16842:22: error: ‘PyThreadState’ has no member named ‘exc_type’ tmp_type = tstate->exc_type; ^ glove/glove_cython.c:16843:23: error: ‘PyThreadState’ has no member named ‘exc_value’ tmp_value = tstate->exc_value; ^ glove/glove_cython.c:16844:20: error: ‘PyThreadState’ has no member named ‘exc_traceback’ tmp_tb = tstate->exc_traceback; ^ glove/glove_cython.c:16845:11: error: ‘PyThreadState’ has no member named ‘exc_type’ tstate->exc_type = *type; ^ glove/glove_cython.c:16846:11: error: ‘PyThreadState’ has no member named ‘exc_value’ tstate->exc_value = *value; ^ glove/glove_cython.c:16847:11: error: ‘PyThreadState’ has no member named ‘exc_traceback’ tstate->exc_traceback = *tb; ^ error: command ‘gcc’ failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /home/mrim/manniona/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '”‘"’/tmp/pip-install-xqc8h49a/glove-python/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-xqc8h49a/glove-python/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-orwjmsvp/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.`
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top GitHub Comments
@jk your anaconda installation is python 3.7 so some of the glove-python files need to be re-compiled.
Glad to have helped and thanks for the mini-docker tutorial in return 😄