I know this question or various forms of it has been asked. I am just trying to follow the Django tutorial on Heroku - which involves installing django-heroku, which has psycopg2 as a dependency. I am running MacOS Catalina, 10.15.3.
I know one work around is to download the binary with pip install psycopg2-binary, but then I don't know how to get pip to recognize psycopg2-binary and stop trying to install psycopg2 from source when I run pip install django-heroku. So I suppose if someone could help me figure out that workaround, that would also suffice - although at this point I think I'm just gonna use Node. In any case, I feel like it's most likely just another instance of Catalina breaking things, but it would be nice to know how to fix this in case I ever have to use django-heroku/psycopg2.
I have upgraded homebrew, reinstalled pyenv/python3.7.4, updated pip.
I have openssl 1.1.1g installed (homebrew).
I recently reinstalled XCode - but just to be sure it wasn't my compiler's fault, I installed homebrew clang using brew install llvm.
Building wheels for collected packages: psycopg2
Building wheel for psycopg2 (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Users/yafeng/.pyenv/versions/3.7.4/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/8w/_05ytnqn3xlgr133pk_zhzf80000gn/T/pip-install-cr8d3luc/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/8w/_05ytnqn3xlgr133pk_zhzf80000gn/T/pip-install-cr8d3luc/psycopg2/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 /private/var/folders/8w/_05ytnqn3xlgr133pk_zhzf80000gn/T/pip-wheel-wc4izvs3 --python-tag cp37
cwd: /private/var/folders/8w/_05ytnqn3xlgr133pk_zhzf80000gn/T/pip-install-cr8d3luc/psycopg2/
Complete output (76421 lines):
running bdist_wheel
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/psycopg2
...
194 warnings generated.
clang -bundle -undefined dynamic_lookup -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/Users/yafeng/.pyenv/versions/3.7.4/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/Users/yafeng/.pyenv/versions/3.7.4/lib build/temp.macosx-10.14-x86_64-3.7/psycopg/psycopgmodule.o build/temp.macosx-10.14-x86_64-3.7/psycopg/green.o build/temp.macosx-10.14-x86_64-3.7/psycopg/pqpath.o build/temp.macosx-10.14-x86_64-3.7/psycopg/utils.o build/temp.macosx-10.14-x86_64-3.7/psycopg/bytes_format.o build/temp.macosx-10.14-x86_64-3.7/psycopg/libpq_support.o build/temp.macosx-10.14-x86_64-3.7/psycopg/win32_support.o build/temp.macosx-10.14-x86_64-3.7/psycopg/solaris_support.o build/temp.macosx-10.14-x86_64-3.7/psycopg/aix_support.o build/temp.macosx-10.14-x86_64-3.7/psycopg/connection_int.o build/temp.macosx-10.14-x86_64-3.7/psycopg/connection_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/cursor_int.o build/temp.macosx-10.14-x86_64-3.7/psycopg/cursor_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/column_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/replication_connection_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/replication_cursor_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/replication_message_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/diagnostics_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/error_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/conninfo_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/lobject_int.o build/temp.macosx-10.14-x86_64-3.7/psycopg/lobject_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/notify_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/xid_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_asis.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_binary.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_datetime.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_list.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_pboolean.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_pdecimal.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_pint.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_pfloat.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_qstring.o build/temp.macosx-10.14-x86_64-3.7/psycopg/microprotocols.o build/temp.macosx-10.14-x86_64-3.7/psycopg/microprotocols_proto.o build/temp.macosx-10.14-x86_64-3.7/psycopg/typecast.o -L/usr/local/lib -lpq -lssl -lcrypto -o build/lib.macosx-10.14-x86_64-3.7/psycopg2/_psycopg.cpython-37m-darwin.so
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for psycopg2
Running setup.py clean for psycopg2
Failed to build psycopg2
Installing collected packages: dj-database-url, psycopg2, django-heroku
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
command: /Users/yafeng/.pyenv/versions/3.7.4/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/8w/_05ytnqn3xlgr133pk_zhzf80000gn/T/pip-install-cr8d3luc/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/8w/_05ytnqn3xlgr133pk_zhzf80000gn/T/pip-install-cr8d3luc/psycopg2/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/8w/_05ytnqn3xlgr133pk_zhzf80000gn/T/pip-record-yhjz7c5j/install-record.txt --single-version-externally-managed --compile
cwd: /private/var/folders/8w/_05ytnqn3xlgr133pk_zhzf80000gn/T/pip-install-cr8d3luc/psycopg2/
...
Related
My environment
python2.7 running on Anaconda version 2019.10.
macOS Catalina 10.15.5.
The problem
I cannot seem to install the package spaCy on python. I have followed the documentation of spaCy (https://spacy.io/usage) to no avail. I have tried conda, pip and installing from source.
Reproducing the problem
conda install (takes a long time then gets stuck)
(base) MacBook-Pro:~ max$ sudo conda install -c conda-forge spacy
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: \ (gets stuck here)
pip install
(base) MacBook-Pro:~ max$ pip install -U spacy
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting spacy
Using cached https://files.pythonhosted.org/packages/18/db/499f374339b522b6618234b93f25d2990692795ccce3152519ccc508586c/spacy-2.3.2.tar.gz
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /Applications/anaconda2/bin/python /Applications/anaconda2/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-build-env-Hm0sIw/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.25' 'cymem>=2.0.2,<2.1.0' 'preshed>=3.0.2,<3.1.0' 'murmurhash>=0.28.0,<1.1.0' thinc==7.4.1
cwd: None
Complete output (191 lines):
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting setuptools
Using cached https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006ec932b4/setuptools-44.1.1-py2.py3-none-any.whl
Collecting wheel
Using cached https://files.pythonhosted.org/packages/a7/00/3df031b3ecd5444d572141321537080b40c1c25e1caa3d86cdd12e5e919c/wheel-0.35.1-py2.py3-none-any.whl
Collecting cython>=0.25
Using cached https://files.pythonhosted.org/packages/69/a7/6f692f3535e736d13add7841b9ee2ec5997832b26b72decc928f62404986/Cython-0.29.21-cp27-cp27m-macosx_10_9_x86_64.whl
Collecting cymem<2.1.0,>=2.0.2
Using cached https://files.pythonhosted.org/packages/ce/8d/d095bbb109a004351c85c83bc853782fc27692693b305dd7b170c36a1262/cymem-2.0.3.tar.gz
Collecting preshed<3.1.0,>=3.0.2
Using cached https://files.pythonhosted.org/packages/b2/44/f244c9b1c8d5ca79e0afdd20e04a93b45160f1541f9904c44673bb8e48d1/preshed-3.0.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting murmurhash<1.1.0,>=0.28.0
Using cached https://files.pythonhosted.org/packages/1a/be/1a824e7faeb786af7e9931a29034f09d877e3340c536dc9bf10f65b4d422/murmurhash-1.0.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting thinc==7.4.1
Collecting pathlib==1.0.1; python_version < "3.4" (from thinc==7.4.1)
Collecting catalogue<1.1.0,>=0.0.7 (from thinc==7.4.1)
Using cached https://files.pythonhosted.org/packages/6c/f9/9a5658e2f56932e41eb264941f9a2cb7f3ce41a80cb36b2af6ab78e2f8af/catalogue-1.0.0-py2.py3-none-any.whl
Collecting srsly<1.1.0,>=0.0.6 (from thinc==7.4.1)
Using cached https://files.pythonhosted.org/packages/c4/28/ffb9f0b940041aeaec2194e840b5ffe19d0ae252de89579fa8b810174d9f/srsly-1.0.2.tar.gz
Collecting tqdm<5.0.0,>=4.10.0 (from thinc==7.4.1)
Using cached https://files.pythonhosted.org/packages/28/7e/281edb5bc3274dfb894d90f4dbacfceaca381c2435ec6187a2c6f329aed7/tqdm-4.48.2-py2.py3-none-any.whl
Collecting plac<1.2.0,>=0.9.6 (from thinc==7.4.1)
Using cached https://files.pythonhosted.org/packages/86/85/40b8f66c2dd8f4fd9f09d59b22720cffecf1331e788b8a0cab5bafb353d1/plac-1.1.3-py2.py3-none-any.whl
Collecting blis<0.5.0,>=0.4.0 (from thinc==7.4.1)
Using cached https://files.pythonhosted.org/packages/09/e0/7f618f18497135cc98f0a09ccaaad795efe044b7e2cfd3f4251acb2a9d0a/blis-0.4.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting numpy>=1.7.0 (from thinc==7.4.1)
Using cached https://files.pythonhosted.org/packages/09/96/84cf406fe7d589f3dba9fc0f737e65985a3526c6d8c783f02d4b5a10825d/numpy-1.16.6-cp27-cp27m-macosx_10_9_x86_64.whl
Collecting wasabi<1.1.0,>=0.0.9 (from thinc==7.4.1)
Collecting importlib-metadata>=0.20; python_version < "3.8" (from catalogue<1.1.0,>=0.0.7->thinc==7.4.1)
Using cached https://files.pythonhosted.org/packages/8e/58/cdea07eb51fc2b906db0968a94700866fc46249bdc75cac23f9d13168929/importlib_metadata-1.7.0-py2.py3-none-any.whl
Collecting zipp>=0.5 (from importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->thinc==7.4.1)
Using cached https://files.pythonhosted.org/packages/96/0a/67556e9b7782df7118c1f49bdc494da5e5e429c93aa77965f33e81287c8c/zipp-1.2.0-py2.py3-none-any.whl
Collecting contextlib2; python_version < "3" (from importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->thinc==7.4.1)
Using cached https://files.pythonhosted.org/packages/85/60/370352f7ef6aa96c52fb001831622f50f923c1d575427d021b8ab3311236/contextlib2-0.6.0.post1-py2.py3-none-any.whl
Collecting pathlib2; python_version < "3" (from importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->thinc==7.4.1)
Using cached https://files.pythonhosted.org/packages/e9/45/9c82d3666af4ef9f221cbb954e1d77ddbb513faf552aea6df5f37f1a4859/pathlib2-2.3.5-py2.py3-none-any.whl
Collecting configparser>=3.5; python_version < "3" (from importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->thinc==7.4.1)
Using cached https://files.pythonhosted.org/packages/7a/2a/95ed0501cf5d8709490b1d3a3f9b5cf340da6c433f896bbe9ce08dbe6785/configparser-4.0.2-py2.py3-none-any.whl
Collecting six (from pathlib2; python_version < "3"->importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->thinc==7.4.1)
Using cached https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Collecting scandir; python_version < "3.5" (from pathlib2; python_version < "3"->importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->thinc==7.4.1)
Building wheels for collected packages: cymem, srsly
Building wheel for cymem (setup.py): started
Building wheel for cymem (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /Applications/anaconda2/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/cymem/setup.py'"'"'; __file__='"'"'/private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/cymem/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 /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-wheel-k463Ej --python-tag cp27
cwd: /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/cymem/
Complete output (25 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-2.7
creating build/lib.macosx-10.7-x86_64-2.7/cymem
copying cymem/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/cymem
copying cymem/about.py -> build/lib.macosx-10.7-x86_64-2.7/cymem
package init file 'cymem/tests/__init__.py' not found (or not a regular file)
creating build/lib.macosx-10.7-x86_64-2.7/cymem/tests
copying cymem/tests/test_import.py -> build/lib.macosx-10.7-x86_64-2.7/cymem/tests
copying cymem/cymem.pyx -> build/lib.macosx-10.7-x86_64-2.7/cymem
copying cymem/__init__.pxd -> build/lib.macosx-10.7-x86_64-2.7/cymem
copying cymem/cymem.pxd -> build/lib.macosx-10.7-x86_64-2.7/cymem
running build_ext
building 'cymem.cymem' extension
creating build/temp.macosx-10.7-x86_64-2.7
creating build/temp.macosx-10.7-x86_64-2.7/cymem
gcc -fno-strict-aliasing -I/Applications/anaconda2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Applications/anaconda2/include/python2.7 -I/Applications/anaconda2/include/python2.7 -c cymem/cymem.cpp -o build/temp.macosx-10.7-x86_64-2.7/cymem/cymem.o -O3 -Wno-strict-prototypes -Wno-unused-function
clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
g++ -bundle -undefined dynamic_lookup -L/Applications/anaconda2/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-2.7/cymem/cymem.o -L/Applications/anaconda2/lib -o build/lib.macosx-10.7-x86_64-2.7/cymem/cymem.so
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'g++' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cymem
Running setup.py clean for cymem
Building wheel for srsly (setup.py): started
Building wheel for srsly (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /Applications/anaconda2/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/srsly/setup.py'"'"'; __file__='"'"'/private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/srsly/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 /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-wheel-eooA7v --python-tag cp27
cwd: /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/srsly/
Complete output (86 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-2.7
creating build/lib.macosx-10.7-x86_64-2.7/srsly
copying srsly/util.py -> build/lib.macosx-10.7-x86_64-2.7/srsly
copying srsly/_msgpack_api.py -> build/lib.macosx-10.7-x86_64-2.7/srsly
copying srsly/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly
copying srsly/about.py -> build/lib.macosx-10.7-x86_64-2.7/srsly
copying srsly/_json_api.py -> build/lib.macosx-10.7-x86_64-2.7/srsly
copying srsly/_pickle_api.py -> build/lib.macosx-10.7-x86_64-2.7/srsly
creating build/lib.macosx-10.7-x86_64-2.7/srsly/ujson
copying srsly/ujson/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/ujson
creating build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
copying srsly/msgpack/_version.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
copying srsly/msgpack/util.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
copying srsly/msgpack/_msgpack_numpy.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
copying srsly/msgpack/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
copying srsly/msgpack/exceptions.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
copying srsly/msgpack/_ext_type.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
creating build/lib.macosx-10.7-x86_64-2.7/srsly/cloudpickle
copying srsly/cloudpickle/cloudpickle.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/cloudpickle
copying srsly/cloudpickle/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/cloudpickle
creating build/lib.macosx-10.7-x86_64-2.7/srsly/tests
copying srsly/tests/test_msgpack_api.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests
copying srsly/tests/test_json_api.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests
copying srsly/tests/test_pickle_api.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests
copying srsly/tests/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests
creating build/lib.macosx-10.7-x86_64-2.7/srsly/tests/ujson
copying srsly/tests/ujson/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/ujson
copying srsly/tests/ujson/test_ujson.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/ujson
creating build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_extension.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_subtype.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_buffer.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_unpack.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_pack.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_except.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_case.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_read_size.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_memoryview.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_seq.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_limits.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_newspec.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_numpy.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_format.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_stricttype.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
copying srsly/tests/msgpack/test_sequnpack.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/msgpack
creating build/lib.macosx-10.7-x86_64-2.7/srsly/tests/cloudpickle
copying srsly/tests/cloudpickle/testutils.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/cloudpickle
copying srsly/tests/cloudpickle/__init__.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/cloudpickle
copying srsly/tests/cloudpickle/cloudpickle_file_test.py -> build/lib.macosx-10.7-x86_64-2.7/srsly/tests/cloudpickle
copying srsly/ujson/ujson.c -> build/lib.macosx-10.7-x86_64-2.7/srsly/ujson
copying srsly/ujson/JSONtoObj.c -> build/lib.macosx-10.7-x86_64-2.7/srsly/ujson
copying srsly/ujson/objToJSON.c -> build/lib.macosx-10.7-x86_64-2.7/srsly/ujson
copying srsly/ujson/version.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/ujson
copying srsly/ujson/py_defines.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/ujson
copying srsly/msgpack/_unpacker.pyx -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
copying srsly/msgpack/_packer.pyx -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
copying srsly/msgpack/sysdep.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
copying srsly/msgpack/pack.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
copying srsly/msgpack/unpack_define.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
copying srsly/msgpack/buff_converter.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
copying srsly/msgpack/unpack.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
copying srsly/msgpack/pack_template.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
copying srsly/msgpack/unpack_template.h -> build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack
running build_ext
building 'srsly.msgpack._unpacker' extension
creating build/temp.macosx-10.7-x86_64-2.7
creating build/temp.macosx-10.7-x86_64-2.7/srsly
creating build/temp.macosx-10.7-x86_64-2.7/srsly/msgpack
gcc -fno-strict-aliasing -I/Applications/anaconda2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D__LITTLE_ENDIAN__=1 -I/Applications/anaconda2/include/python2.7 -I. -I/private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/srsly/include -I/Applications/anaconda2/include/python2.7 -c srsly/msgpack/_unpacker.cpp -o build/temp.macosx-10.7-x86_64-2.7/srsly/msgpack/_unpacker.o -O2 -Wno-strict-prototypes -Wno-unused-function
clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from srsly/msgpack/_unpacker.cpp:615:
srsly/msgpack/unpack.h:277:45: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
py = PyObject_CallFunction(u->ext_hook, "(is#)", (int)typecode, pos, (Py_ssize_t)length-1);
^
1 warning generated.
g++ -bundle -undefined dynamic_lookup -L/Applications/anaconda2/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-2.7/srsly/msgpack/_unpacker.o -L/Applications/anaconda2/lib -o build/lib.macosx-10.7-x86_64-2.7/srsly/msgpack/_unpacker.so -Wl,-rpath,#loader_path/../../srsly/platform/darwin/lib -lstdc++ -lm
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'g++' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for srsly
Running setup.py clean for srsly
Failed to build cymem srsly
Installing collected packages: setuptools, wheel, cython, cymem, murmurhash, preshed, pathlib, contextlib2, zipp, six, scandir, pathlib2, configparser, importlib-metadata, catalogue, srsly, tqdm, plac, numpy, blis, wasabi, thinc
Running setup.py install for cymem: started
Running setup.py install for cymem: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /Applications/anaconda2/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/cymem/setup.py'"'"'; __file__='"'"'/private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/cymem/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/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-record-CJ7M9x/install-record.txt --single-version-externally-managed --prefix /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-build-env-Hm0sIw/overlay --compile
cwd: /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/cymem/
Complete output (10 lines):
running install
running build
running build_py
package init file 'cymem/tests/__init__.py' not found (or not a regular file)
running build_ext
building 'cymem.cymem' extension
gcc -fno-strict-aliasing -I/Applications/anaconda2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Applications/anaconda2/include/python2.7 -I/Applications/anaconda2/include/python2.7 -c cymem/cymem.cpp -o build/temp.macosx-10.7-x86_64-2.7/cymem/cymem.o -O3 -Wno-strict-prototypes -Wno-unused-function
clang: error: no such file or directory: 'cymem/cymem.cpp'
clang: error: no input files
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Applications/anaconda2/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/cymem/setup.py'"'"'; __file__='"'"'/private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-install-E3v5tl/cymem/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/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-record-CJ7M9x/install-record.txt --single-version-externally-managed --prefix /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-build-env-Hm0sIw/overlay --compile Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: /Applications/anaconda2/bin/python /Applications/anaconda2/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/k2/yfz74q0j1zq0_bgpcfvfj7br0000gn/T/pip-build-env-Hm0sIw/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.25' 'cymem>=2.0.2,<2.1.0' 'preshed>=3.0.2,<3.1.0' 'murmurhash>=0.28.0,<1.1.0' thinc==7.4.1 Check the logs for full command output.
from source
cloning works fine
git clone https://github.com/explosion/spaCy
cd spaCy
the following pip install doesn't:
pip install -r requirements.txt
pip install -U spacy-lookups-data
python setup.py build_ext --inplace
The error:
(base) MacBook-Pro:~ max$ pip install -U spacy-lookups-data
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already up-to-date: spacy-lookups-data in /Applications/anaconda2/lib/python2.7/site-packages (0.3.2)
Requirement already satisfied, skipping upgrade: setuptools in /Applications/anaconda2/lib/python2.7/site-packages (from spacy-lookups-data) (41.4.0)
(base) MacBook-Pro:~ max$ python setup.py build_ext --inplace
python: can't open file 'setup.py': [Errno 2] No such file or directory
Try creating a new env instead:
conda create -n my_env spacy python=2.7
changing the Python version to what you require and including whatever additional specs you need at creation time. Conda tends to work much smoother if one separates concerns and creates environments on per task or per project basis.
Side note: using pip in the base env is usually a bad idea. See "Using Pip in a Conda Environment".
When am trying to install the memsql python library getting below error
I have tried the below options already:
sudo pip install memsql
sudo pip install memsql --global-option=build_ext --global-option="-I/usr/local/opt/openssl/include" --global-option="-L/usr/local/opt/openssl/lib"
Installing collected packages: MySQL-python, memsql
Running setup.py install for MySQL-python ... error
Complete output from command /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-JDxMyP/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" build_ext -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib install --record /private/tmp/pip-record-azfFw0/install-record.txt --single-version-externally-managed --compile:
running build_ext
building '_mysql' extension
creating build
creating build/temp.macosx-10.14-intel-2.7
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/local/Cellar/mysql/8.0.15/include/mysql -I/usr/local/opt/openssl/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.14-intel-2.7/_mysql.o
_mysql.c:44:10: fatal error: 'my_config.h' file not found
#include "my_config.h"
^~~~~~~~~~~~~
1 error generated.
error: command 'cc' failed with exit status 1}
In order to install memsql-python you need to ensure that you have the dependencies already available. Specifically, the dependency that seems to be missing from your environment is libmysqlclient-dev or an equivalent package.
Note - you are overriding the include paths to point at your openssl installation which may be causing this issue due to how the compiler is searching for development headers.
According to the project's readme, use the following steps to get started quickly on Ubuntu:
sudo apt-get update
sudo apt-get install -y mysql-client python-dev libmysqlclient-dev python-pip
sudo pip install memsql
Use the following steps to get started with RHEL based distributions such as Amazon Linux or Centos:
sudo yum update
sudo yum install -y gcc mysql-devel
sudo pip install memsql
-- edit to address question regarding installation on Mac OSX
On a Mac it appears that you can install the mysql-client package from brew which in theory should provide the libmysqlclient-dev package. Once available try installing the memsql-python package without overriding linker flags since memsql-python should build fine without openssl. If you need openssl support then you will need to ensure that both the openssl and libmysqlclient-dev shared objects are available to the linker at compilation time.
This procedure worked for me:
brew remove mysql
brew install mysql#5.7
brew link --force mysql#5.7
I read a post and adjusted the procedure to link things in the /usr/local/bin instead of adding a new route to the PATH variable.
Reference: MacOS: "pip install MySQL-python" returning an error: "_mysql.c:44:10: fatal error: 'my_config.h' file not found"
Hello beautiful people of the internet!
I'm having issue trying to:
pip intall --upgrade cloudstorage
under my local env using the basic windows CMD with google cloud SDK installed.
I'm on a Win10 with python 2.7.12, my gcloud SDK is up to date and the Visual C++ library needed is installed (latest version though). Still it raises this error when trying to install the module :
[...]
creating build\temp.win-amd64-2.7\Release\build\temp.win-amd64-2.7\Release
C:\Users\user_name\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\python27\include -Ic:\python27\PC /Tcbuild\temp.win-amd64-2.7\Release\_lib.c /Fobuild\temp.win-amd64-2.7\Release\build\temp.win-amd64-2.7\Release\_lib.obj
_lib.c
build\temp.win-amd64-2.7\Release\_lib.c(504) : fatal error C1083: Cannot open include file: 'sys/xattr.h': No such file or directory
error: command 'C:\\Users\\user_name\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user_name\\appdata\\local\\temp\\pip-install-ekfv8g\\xattr\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\user_name\appdata\local\temp\pip-record-_ejcqu\install-record.txt --single-version-externally-managed --compile --home=c:\users\user_name\appdata\local\temp\pip-target-ndt9sh" failed with error code 1 in c:\users\user_name\appdata\local\temp\pip-install-ekfv8g\xattr\
I've also tried to run the installation under Debian WSL without success...
Also 'setuptools' is up to date.
Any clue, any one ?
Edit:
Corrected with this answer. Getting a new error :
[...]
MSVCRT.lib(MSVCR90.dll) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
error: command 'C:\\Users\\user_name\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\link.exe' failed with exit status 1112
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user_name\\appdata\\local\\temp\\pip-install-8hhqj3\\netifaces\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\user_name\appdata\local\temp\pip-record-nmoe3e\install-record.txt --single-version-externally-managed --compile --home=c:\users\user_name\appdata\local\temp\pip-target-gb8zwx" failed with error code 1 in c:\users\user_name\appdata\local\temp\pip-install-8hhqj3\netifaces\
Corrected with this answer.
Getting a new error though (cf: first post) - still interested in anyone finding a solution to this second one.
Former marine grunt here! New to python and coding. Trying to install DLIB for python 2.7. I run the command pip install dlib and keep getting this error message:
Collecting dlib
Using cached dlib-19.1.0.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\pickfl~1\\appdata\\local\\temp\\pip-build-4qhao2\\dlib\\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 c:\users\pickfl~1\appdata\local\temp\tmpcvgy9jpip-wheel- --python-tag cp27:
running bdist_wheel
running build
Detected Python architecture: 32bit
Detected platform: win32
Configuring cmake ...
-- Building for: NMake Makefiles
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error in CMakeLists.txt:
The CMAKE_CXX_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Pickflickr1/AppData/Local/Temp/pip-build-4qhao2/dlib/tools/python/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Pickflickr1/AppData/Local/Temp/pip-build-4qhao2/dlib/tools/python/build/CMakeFiles/CMakeError.log".
error: cmake configuration failed!
---------------------------------------- Failed building wheel for dlib
Along with this:
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\pickfl~1\\appdata\\local\\temp\\pip-build-4qhao2\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install
--record c:\users\pickfl~1\appdata\local\temp\pip-l8pcsq-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in c:\users\pickfl~1\appdata\local\temp\pip-build-4qhao2\dlib\
Any feedback or help would be great! Former jarhead so bear with me, thanks.
Try this:
conda install -c menpo dlib=18.18
First Install all the dependencies for dlib library :->
sudo apt-get install python-dev python-pip
sudo apt-get install build-essential cmake pkg-config
sudo apt-get install libx11-dev libatlas-base-dev
sudo apt-get install libgtk-3-dev libboost-python-dev
Then Execute
pip install dlib
Enjoy computer-vision.....
“A lot of the future of search is going to be about pictures. Computer vision technology is going to be a big deal”
Ben Silbermann
First you need to have pip installed. Then you can download the dlib python 2.7 version from "https://pypi.python.org/pypi/dlib/18.17.100" website where you will get wheel of dlib. And then use normal procedure like pip install 'path to dlib wheel'.
For ex. f you have saved .whl file to downloads folder then type pip install C:\Users\XYZ\Downloads\dlib-18.17.100-cp27-none-win32.whl.
This will surely work. When I tried I didn't get any error and dlib got successfully installed.
Cheers
The pip package might be broken or might not be updated. Anyway, download the dlib_master from :https://github.com/davisking/dlib.git
After that there is an easy guide for installation in python. Go to the folder containing setup.py and then open terminal or whatever and type
sudo python setup.py install.
When I sudo pip install pyquery, sudo pip install lxml, and sudo pip install cython, I get very similar output with the same error that says:
x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-fstack-protector-strong’
Here's the complete pip output for sudo pip install pyquery:
Requirement already satisfied (use --upgrade to upgrade): pyquery in /usr/local/lib/python2.7/dist-packages
Downloading/unpacking lxml>=2.1 (from pyquery)
Running setup.py egg_info for package lxml
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.1.
Building without Cython.
Using build configuration of libxslt 1.1.28
Requirement already satisfied (use --upgrade to upgrade): cssselect in /usr/local/lib/python2.7/dist-packages/cssselect-0.9.1-py2.7.egg (from pyquery)
Installing collected packages: lxml
Running setup.py install for lxml
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.1.
Building without Cython.
Using build configuration of libxslt 1.1.28
building 'lxml.etree' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/libxml2 -I/root/build/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-fstack-protector-strong’
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools;__file__='/root/build/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-gg4SuG-record/install-record.txt:
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.1.
Building without Cython.
Using build configuration of libxslt 1.1.28
running install
running build
running build_py
copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-2.7/lxml/includes
running build_ext
building 'lxml.etree' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/libxml2 -I/root/build/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-fstack-protector-strong’
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/root/build/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-gg4SuG-record/install-record.txt failed with error code 1 in /root/build/lxml
Storing complete log in /root/.pip/pip.log
The complete log from /root/.pip/pip.log is here: http://pastebin.com/5R4VZDu8
I've looked at this, this, this, and this for help, but I haven't been able to solve the issue yet.
I've already installed libxml2-dev, libxslt1-dev, and python-dev. I'm running Debian 7.0 x64 on a DigitalOcean droplet.
I'm just trying to install pyquery. Can someone please help me out?
Thanks
I ran into this problem when I attempted to upgrade my pandas version to 0.15.2
If you install gcc-4.9 you are likely to still have an older version of gcc on your system (gcc-4.7 in my case).
I can think of 3 ways to solve this issue:
a) symlink /usr/bin/x86_64-linux-gnu-gcc to
/usr/bin/x86_64-linux-gnu-gcc-4.9
if you want to be more organized about this use update-alternatives, see https://askubuntu.com/questions/26498/choose-gcc-and-g-version
b) figure out how to manually specify which compiler pip uses and set it in some sort of .conf file - I haven't examined where this file lives or if there are CLI options for pip that accomplish the equivalent. In principle, creating/editing a /usr/lib/pythonX.Y/distutils/distutils.cfg should do it. I ran into problems when I tried to use this approach.
c) Edit /usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.py to reflect your updated compiler
How to use MinGW's gcc compiler when installing Python package using Pip?
https://docs.python.org/2/install/#distutils-configuration-files
I went with the quick and dirty solution (a) to force everything to work
root#localhost:/home/user1$ rm /usr/bin/x86_64-linux-gnu-gcc
root#localhost:/home/user1$ ln -s /usr/bin/gcc-4.9 /usr/bin/x86_64-linux-gnu-gcc
root#localhost:/home/user1$ pip install pandas --upgrade
. . . pandas compiles with gcc-4.9 here . . .
move things back to how they were
root#localhost:/home/user1$ rm /usr/bin/x86_64-linux-gnu-gcc
root#localhost:/home/user1$ ln -s /usr/bin/gcc-4.7 /usr/bin/x86_64-linux-gnu-gcc
One possible solution would be to use GCC 4.9 or higher, which does support the -fstack-protector-strong flag.
Instead of upgrading to GCC 4.9, I was trying to find where the flag was defined and remove it. On Debian Wheezy, I found it in /usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.py which belongs to the libpython2.7-minimal package. My solution was to replace all occurrences of -fstack-protector-strong with -fstack-protector within this file. Then pip install executed the correct build command.