mod_wgi installation failed with python3 - python

trying to install mod_wsgi for django1.9 (python version 3.5 ) . But getting below error
gcc -pthread -shared build/temp.linux-x86_64-3.5/src/server/wsgi_validate.o build/temp.linux-x86_64-3.5/src/server/wsgi_thread.o build/temp.linux-x86_64-3.5/src/server/wsgi_stream.o build/temp.linux-x86_64-3.5/src/server/wsgi_server.o build/temp.linux-x86_64-3.5/src/server/wsgi_restrict.o build/temp.linux-x86_64-3.5/src/server/wsgi_metrics.o build/temp.linux-x86_64-3.5/src/server/wsgi_memory.o build/temp.linux-x86_64-3.5/src/server/wsgi_logger.o build/temp.linux-x86_64-3.5/src/server/wsgi_interp.o build/temp.linux-x86_64-3.5/src/server/wsgi_daemon.o build/temp.linux-x86_64-3.5/src/server/wsgi_convert.o build/temp.linux-x86_64-3.5/src/server/wsgi_buckets.o build/temp.linux-x86_64-3.5/src/server/wsgi_apache.o build/temp.linux-x86_64-3.5/src/server/mod_wsgi.o -o build/lib.linux-x86_64-3.5/mod_wsgi/server/mod_wsgi-py35.cpython-35m-x86_64-linux-gnu.so -L/home/webdev01/python3/lib -L/home/webdev01/python3/lib/python3.5/config-3.5m -lpython3.5m
/usr/bin/ld: /home/webdev01/python3/lib/libpython3.5m.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/home/webdev01/python3/lib/libpython3.5m.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/web0/home/webdev01/pythonenv3/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-6atgj_5e-build/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-bcnhqmnp-record/install-record.txt --single-version-externally-managed --compile --install-headers /web0/home/webdev01/pythonenv3/include/site/python3.5/mod-wsgi" failed with error code 1 in /tmp/pip-6atgj_5e-build/

Variation of:
http://modwsgi.readthedocs.io/en/develop/user-guides/installation-issues.html#mixing-32-bit-and-64-bit-packages
You need to install Python with a shared library.

Related

Fail to install facemorpher on Ubuntu 18.04

I have a Ubuntu 18.04 and executed the packages from requirements.txt in the following Github repository https://github.com/alyssaq/face_morpher.
While installing facemorpher using the following command pip3 install facemorpher getting the errors given below. I don't find opencv2 folder
Error Logs:
In file included from src/py_wrapper.cpp:13:0:
src/stasm.h:33:10: fatal error: opencv2/opencv.hpp: No such file or directory
#include "opencv2/opencv.hpp"
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-g5nna6ak/stasm/setup.py';f In file included from src/py_wrapper.cpp:13:0:
src/stasm.h:33:10: fatal error: opencv2/opencv.hpp: No such file or directory
#inc ----------------------------------------
lude "opencv2/opencv.hpp"
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-g5nna6ak/stasm/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-7nioxx18-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-g5nna6ak/stasm/
=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-7nioxx18-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-g5nna6ak/stasm/`

showing error while trying to install jupyter in ubuntu

Command : sudopip install jupyter
Error :
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-En0PFz/scandir/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-OVVJzg-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying scandir.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_scandir' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c _scandir.c -o build/temp.linux-x86_64-2.7/_scandir.o
_scandir.c:14:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-En0PFz/scandir/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-OVVJzg-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-En0PFz/scandir/
First:
$ sudo apt-get install python-dev
and then:
$ sudo pip install jupyter

pycurl link error after upgrade from Yosemite to High Sierra

I just upgraded from Yosemite to High Sierra, which worked quite well, with the only exception that I have a bug in pycurl.
import pycurl
ImportError: No module named pycurl
so I did
pip uninstall pycurl
and
pip install --no-cache-dir --compile pycurl
but now it results in a clang error
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.10-x86_64-2.7/src/docstrings.o build/temp.macosx-10.10-x86_64-2.7/src/easy.o build/temp.macosx-10.10-x86_64-2.7/src/module.o build/temp.macosx-10.10-x86_64-2.7/src/multi.o build/temp.macosx-10.10-x86_64-2.7/src/oscompat.o build/temp.macosx-10.10-x86_64-2.7/src/pythoncompat.o build/temp.macosx-10.10-x86_64-2.7/src/share.o build/temp.macosx-10.10-x86_64-2.7/src/stringcompat.o build/temp.macosx-10.10-x86_64-2.7/src/threadsupport.o -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib -lssl3 -lcurl -o build/lib.macosx-10.10-x86_64-2.7/pycurl.so
ld: library not found for -lssl3
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/5h/h0hwdpps0cd_v2k_m652wwzm0000gq/T/pip-build-1rx5q1/pycurl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/5h/h0hwdpps0cd_v2k_m652wwzm0000gq/T/pip-MkzYNt-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/5h/h0hwdpps0cd_v2k_m652wwzm0000gq/T/pip-build-1rx5q1/pycurl/
any idea what is going on here?
this fixed it...
export PYCURL_SSL_LIBRARY=openssl

Spacy can't be installed in virtualenv which is created with pypy

I created virtualenv(pypy as compiler).
Now when I tried to install Spacy using pip I get below error.
Failed to build spacy thinc
Installing collected packages: thinc, ujson, certifi, chardet, idna, urllib3, requests, regex, webencodings, html5lib, wcwidth, ftfy, spacy
Running setup.py install for thinc ... error
Complete output from command /Users/azar-4893/Python_Venv/falconpypy/bin/pypy -u -c "import setuptools, tokenize;__file__='/private/var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-build-F0nppE/thinc/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-Thl94z-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/azar-4893/Python_Venv/falconpypy/include/site/python2.7/thinc:
running install
running build
running build_py
running build_ext
building 'thinc.linalg' extension
gcc -pthread -arch x86_64 -DNDEBUG -O2 -fPIC -I/Users/azar-4893/Python_Venv/falconpypy/include -I/private/var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-build-F0nppE/thinc/include -I/Users/azar-4893/Python_Venv/falconpypy/include -c thinc/linalg.cpp -o build/temp.macosx-10.11-x86_64-2.7/thinc/linalg.o -O3 -Wno-strict-prototypes -Wno-unused-function
clang: error: no such file or directory: 'thinc/linalg.cpp'
clang: error: no input files
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/Users/azar-4893/Python_Venv/falconpypy/bin/pypy -u -c "import setuptools, tokenize;__file__='/private/var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-build-F0nppE/thinc/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-Thl94z-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/azar-4893/Python_Venv/falconpypy/include/site/python2.7/thinc" failed with error code 1 in /private/var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-build-F0nppE/thinc/
Is there a way to install spacy for pypy?
spacy uses a c-extensions module called thinc to do its heavy lifting in C. The latest PyPy cannot install thinc, there are multiple issues blocking its installation. Here is one on thinc, and this as yet unsupported call to PyFrozenSet_New in cytoolz
On MacOS, try this--
CFLAGS='-stdlib=libc++' pip install spacy==2.0.12 thinc==6.10.3 google-compute-engine https://github.com/huggingface/neuralcoref-models/releases/download/en_coref_md-3.0.0/en_coref_md-3.0.0.tar.gz

Error 'could not read symbols: Bad value' when installing Python

i need to install mod_wsgi for Django, but when i do pip install mod_wsgi i have an error:
/usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/local/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-LHF3wD/mod-wsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lWmQhZ-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-LHF3wD/mod-wsgi/
So i found information about this problem and i tried to reconfigure python like this:
make clean
./configure --enable-shared
make
But now i have the same error after make command:
/usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
OS: CentOS 6,
python version: 2.7
Also i already have mod_wsgi for Python6.6 (by default. I installed "web server" version of centos)
What is wrong? Thanks.

Categories