sudo python3 -m pip install textract
sudo apt-get install textract
pip install textract
sudo apt-get install swig
I want to install textract in python3 but it is not install proper way, it gives the following error.
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/usr/include/python2.7 -c swig/sphinxbase/ad_wrap.c -o build/temp.linux-x86_64-2.7/swig/sphinxbase/ad_wrap.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/usr/include/python2.7 -c deps/sphinxbase/src/libsphinxad/ad_pulse.c -o build/temp.linux-x86_64-2.7/deps/sphinxbase/src/libsphinxad/ad_pulse.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
deps/sphinxbase/src/libsphinxad/ad_pulse.c:44:30: fatal error: pulse/pulseaudio.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Follow these steps:
Download the source file for textract from: https://pypi.python.org/pypi/textract
pip3 install pdfminer3k
untar the downloaded file
cd into the directory
run: python3 setup.py install
You will need to install the libpulse-dev in Ubuntu or pulseaudio-libs-devel in Fedora first.
If you are in Ubuntu try sudo apt-get install libpulse-dev
If you are in Fedora try sudo dnf install pulseaudio-libs-devel
At least this works for me.
First install pip in conda. python -m pip install --upgrade pip
then install textract, pip install textract
Late reply, but instead of pip you should check out conda it's much more encapsulated in regards to installing this package.
To install this package with conda run one of the following:
conda install -c conda-forge textract
conda install -c conda-forge/label/cf201901 textract
conda install -c conda-forge/label/cf202003 textract
Source:
https://anaconda.org/conda-forge/textract
You can install it using the following command:
pip install git+https://github.com/deanmalmgren/textract.git
Related
I need help fixing this. I have pillow 7.0.0 installed but it is not accessible in my virtual environment. Trying to install using pip install pillow in the virtual env throws the error below. Can someone shed some light on how to fix this?
Collecting pillow
Using cached Pillow-9.1.0.tar.gz (49.8 MB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pillow
Building wheel for pillow (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [156 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
...
x86_64-linux-gnu-gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DPILLOW_VERSION=\"9.1.0\" -I/tmp/pip-install-dxz6gg5z/pillow_5c0ecf282df741a599c5f2ec14a30181 -I/usr/local/include -I/usr/include -I/home/onah/PycharmProjects/ecommerce/venv/include -I/usr/include/python3.11 -c src/_imaging.c -o build/temp.linux-x86_64-cpython-311/src/_imaging.o
x86_64-linux-gnu-gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/tmp/pip-install-dxz6gg5z/pillow_5c0ecf282df741a599c5f2ec14a30181 -I/usr/local/include -I/usr/include -I/home/onah/PycharmProjects/ecommerce/venv/include -I/usr/include/python3.11 -c src/_imagingmorph.c -o build/temp.linux-x86_64-cpython-311/src/_imagingmorph.o
I'm trying to connect to SQL Server from Raspberry Pi 3. I've already tried everything that google search suggested and still can't manage to install pymssql using pip3.
All the needed packages were installed, but it still fails to create the wheel-file.
I get this error:
pi#nl-raspi:~ $ sudo pip3 install pymssql
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pymssql
Using cached https://files.pythonhosted.org/packages/25/f4/7a8f70edbfdc4de0f72ba44611b6ed6c175a1b2b1ce22051af0e8a8111c1/pymssql-2.2.2.tar.gz
Installing build dependencies ... done
Building wheels for collected packages: pymssql
Running setup.py bdist_wheel for pymssql ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-19za_p6j/pymssql/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-3kw1_04w --python-tag cp37:
setup.py: platform.system() => Linux
setup.py: platform.architecture() => ('32bit', 'ELF')
setup.py: platform.libc_ver() => ('glibc', '2.28')
setup.py: include_dirs => []
setup.py: library_dirs => []
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/pymssql
copying src/pymssql/__init__.py -> build/lib.linux-armv7l-3.7/pymssql
running build_ext
cythoning src/pymssql/_mssql.pyx to src/pymssql/_mssql.c
cythoning src/pymssql/_pymssql.pyx to src/pymssql/_pymssql.c
building 'pymssql._mssql' extension
creating build/temp.linux-armv7l-3.7
creating build/temp.linux-armv7l-3.7/src
creating build/temp.linux-armv7l-3.7/src/pymssql
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c src/pymssql/_mssql.c -o build/temp.linux-armv7l-3.7/src/pymssql/_mssql.o -DMSDBLIB
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.7/src/pymssql/_mssql.o -lsybdb -lssl -lcrypto -o build/lib.linux-armv7l-3.7/pymssql/_mssql.cpython-37m-arm-linux-gnueabihf.so
/usr/bin/ld: -lssl kann nicht gefunden werden
/usr/bin/ld: -lcrypto kann nicht gefunden werden
collect2: error: ld returned 1 exit status
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pymssql
Running setup.py clean for pymssql
I've already tried to build freeTDS from source code, which also didn't helped.
Can someone help me to install pymssql on Raspberry Pi?
For those who had the same error, you have to install libssl-dev.
sudo apt-get install libssl-dev
I followed these topics:
https://devtalk.nvidia.com/default/topic/1044958/jetson-agx-xavier/scikit-learn-for-python-3-on-jetson-xavier/
https://devtalk.nvidia.com/default/topic/1049684/jetson-nano/errors-during-install-sklearn-/
https://github.com/scikit-learn/scikit-learn/issues/12707
python version: 3.6.9
Here are all commands I run:
sudo apt-get update
sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev
sudo apt-get install python3-pip
sudo pip3 install -U pip testresources setuptools
sudo pip3 install -U numpy==1.16.1 future==0.17.1 mock==3.0.5 h5py==2.9.0 keras_preprocessing==1.0.5 keras_applications==1.0.8 gast==0.2.2 enum34 futures protobuf
sudo pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v43 tensorflow-gpu==1.15.0+nv19.12
sudo apt-get install python3-opencv
sudo apt-get install python3-pandas
sudo apt-get install python3-keras
sudo apt-get install gfortran
sudo apt-get install python3-scipy
sudo apt-get install python3-matplotlib
sudo apt-get install python3-imageio
pip3 install dlib
sudo apt-get install -y build-essential libatlas-base-dev
pip3 install --upgrade setuptools
sudo pip3 install -U setuptools
sudo apt-get install libpcap-dev libpq-dev
sudo pip3 install cython
sudo pip3 install git+https://github.com/scikit-learn/scikit-learn.git
and I got the long error below
compile options: '-I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c'
aarch64-linux-gnu-gcc: scipy/cluster/_hierarchy.c
In file included from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from scipy/cluster/_hierarchy.c:598:
/usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it with " \
^~~~~~~
scipy/cluster/_hierarchy.c:19289:18: warning: ‘__Pyx_CFunc_double____double____double____double____int____int____int___to_py’ defined but not used [-Wunused-function]
static PyObject *__Pyx_CFunc_double____double____double____double____int____int____int___to_py(double (*__pyx_v_f)(double, double, double, int, int, int)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scipy/cluster/_hierarchy.c: In function ‘__pyx_pw_5scipy_7cluster_10_hierarchy_27nn_chain’:
scipy/cluster/_hierarchy.c:13560:10: warning: ‘__pyx_v_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (__pyx_t_12) {
^
scipy/cluster/_hierarchy.c:13074:7: note: ‘__pyx_v_y’ was declared here
int __pyx_v_y;
^~~~~~~~~
scipy/cluster/_hierarchy.c: In function ‘__pyx_pw_5scipy_7cluster_10_hierarchy_23linkage’:
scipy/cluster/_hierarchy.c:11431:16: warning: ‘__pyx_v_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__pyx_t_23 = __pyx_v_y;
~~~~~~~~~~~^~~~~~~~~~~
scipy/cluster/_hierarchy.c:11060:7: note: ‘__pyx_v_y’ was declared here
int __pyx_v_y;
^~~~~~~~~
scipy/cluster/_hierarchy.c:11421:16: warning: ‘__pyx_v_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__pyx_t_22 = __pyx_v_x;
~~~~~~~~~~~^~~~~~~~~~~
scipy/cluster/_hierarchy.c:11059:7: note: ‘__pyx_v_x’ was declared here
int __pyx_v_x;
^~~~~~~~~
scipy/cluster/_hierarchy.c: In function ‘__pyx_pw_5scipy_7cluster_10_hierarchy_25fast_linkage’:
scipy/cluster/_hierarchy.c:12682:92: warning: ‘__pyx_v_dist’ may be used uninitialized in this function [-Wmaybe-uninitialized]
*((double *) ( /* dim=0 */ (__pyx_v_D.data + __pyx_t_44 * __pyx_v_D.strides[0]) )) = __pyx_v_new_dist((*((double *) ( /* dim=0 */ (__pyx_v_D.data + __pyx_t_42 * __pyx_v_D.strides[0]) ))), (*((double *) ( /* dim=0 */ (__pyx_v_D.data + __pyx_t_43 * __pyx_v_D.strides[0]) ))), __pyx_v_dist, __pyx_v_nx, __pyx_v_ny, __pyx_v_nz);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scipy/cluster/_hierarchy.c:11978:10: note: ‘__pyx_v_dist’ was declared here
double __pyx_v_dist;
^~~~~~~~~~~~
scipy/cluster/_hierarchy.c:11971:7: warning: ‘__pyx_v_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
int __pyx_v_y;
^~~~~~~~~
scipy/cluster/_hierarchy.c: In function ‘__pyx_pw_5scipy_7cluster_10_hierarchy_29mst_single_linkage’:
scipy/cluster/_hierarchy.c:14363:142: warning: ‘__pyx_v_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_Z.data + __pyx_t_25 * __pyx_v_Z.strides[0]) ) + __pyx_t_26 * __pyx_v_Z.strides[1]) )) = __pyx_v_y;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
scipy/cluster/_hierarchy.c:13995:7: note: ‘__pyx_v_y’ was declared here
int __pyx_v_y;
^~~~~~~~~
aarch64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-aarch64-3.6/scipy/cluster/_hierarchy.o -Lbuild/temp.linux-aarch64-3.6 -o build/lib.linux-aarch64-3.6/scipy/cluster/_hierarchy.cpython-36m-aarch64-linux-gnu.so -Wl,--version-script=build/temp.linux-aarch64-3.6/link-version-scipy.cluster._hierarchy.map
building 'scipy.cluster._optimal_leaf_ordering' extension
compiling C sources
C compiler: aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
compile options: '-I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c'
aarch64-linux-gnu-gcc: scipy/cluster/_optimal_leaf_ordering.c
In file included from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from scipy/cluster/_optimal_leaf_ordering.c:598:
/usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it with " \
^~~~~~~
scipy/cluster/_optimal_leaf_ordering.c: In function ‘__pyx_pf_5scipy_7cluster_22_optimal_leaf_ordering_optimal_leaf_ordering.isra.58’:
scipy/cluster/_optimal_leaf_ordering.c:4747:19: warning: ‘__pyx_v_best_w’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__pyx_t_117 = __pyx_v_best_w;
~~~~~~~~~~~~^~~~~~~~~~~~~~~~
scipy/cluster/_optimal_leaf_ordering.c:3414:7: note: ‘__pyx_v_best_w’ was declared here
int __pyx_v_best_w;
^~~~~~~~~~~~~~
scipy/cluster/_optimal_leaf_ordering.c:4746:19: warning: ‘__pyx_v_best_u’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__pyx_t_116 = __pyx_v_best_u;
~~~~~~~~~~~~^~~~~~~~~~~~~~~~
scipy/cluster/_optimal_leaf_ordering.c:3413:7: note: ‘__pyx_v_best_u’ was declared here
int __pyx_v_best_u;
^~~~~~~~~~~~~~
aarch64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-aarch64-3.6/scipy/cluster/_optimal_leaf_ordering.o -Lbuild/temp.linux-aarch64-3.6 -o build/lib.linux-aarch64-3.6/scipy/cluster/_optimal_leaf_ordering.cpython-36m-aarch64-linux-gnu.so -Wl,--version-script=build/temp.linux-aarch64-3.6/link-version-scipy.cluster._optimal_leaf_ordering.map
C compiler: aarch64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
creating /tmp/tmpvz7d4hd0/tmp
creating /tmp/tmpvz7d4hd0/tmp/tmpvz7d4hd0
compile options: '-I/usr/include/python3.6m -c'
extra options: '-std=c++14'
aarch64-linux-gnu-g++: /tmp/tmpvz7d4hd0/main.c
C compiler: aarch64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
creating /tmp/tmp3j3pimiu/tmp
creating /tmp/tmp3j3pimiu/tmp/tmp3j3pimiu
compile options: '-I/usr/include/python3.6m -c'
extra options: '-std=c++14 -fvisibility=hidden'
aarch64-linux-gnu-g++: /tmp/tmp3j3pimiu/main.c
C compiler: aarch64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
creating /tmp/tmpmxeh9kyu/tmp
creating /tmp/tmpmxeh9kyu/tmp/tmpmxeh9kyu
compile options: '-I/usr/include/python3.6m -c'
aarch64-linux-gnu-g++: /tmp/tmpmxeh9kyu/main.c
building 'scipy.fft._pocketfft.pypocketfft' extension
compiling C++ sources
C compiler: aarch64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
creating build/temp.linux-aarch64-3.6/scipy/fft
creating build/temp.linux-aarch64-3.6/scipy/fft/_pocketfft
compile options: '-DPOCKETFFT_PTHREADS -I/home/dlinano/.local/include/python3.6m -I/usr/local/include/python3.6 -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c'
extra options: '-std=c++14 -fvisibility=hidden'
aarch64-linux-gnu-g++: scipy/fft/_pocketfft/pypocketfft.cxx
scipy/fft/_pocketfft/pypocketfft.cxx:15:10: fatal error: pybind11/pybind11.h: No such file or directory
#include <pybind11/pybind11.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Running from scipy source directory.
/usr/local/lib/python3.6/dist-packages/numpy/distutils/system_info.py:728: UserWarning: Specified path /usr/local/include/python3.6m is invalid.
return self.get_paths(self.section, key)
error: Command "aarch64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPOCKETFFT_PTHREADS -I/home/dlinano/.local/include/python3.6m -I/usr/local/include/python3.6 -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c scipy/fft/_pocketfft/pypocketfft.cxx -o build/temp.linux-aarch64-3.6/scipy/fft/_pocketfft/pypocketfft.o -MMD -MF build/temp.linux-aarch64-3.6/scipy/fft/_pocketfft/pypocketfft.o.d -std=c++14 -fvisibility=hidden" failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-dfzx1730/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.28.5' 'numpy>=1.13.3' 'scipy>=0.19.1' Check the logs for full command output.
Please check this full logs:
https://drive.google.com/file/d/1gLcSq86Aic5uFoPr8k6Cp366eRB2tlfw/view?usp=sharing
This is what worked for me.
sudo -H pip3 install scikit-learn
Here is my full installation script for the order in which the dependencies are installed.
#tensorflow - zoo
sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev
sudo apt-get install python3-pip
sudo -H pip3 install -U pip
sudo -H pip3 install -U numpy grpcio absl-py py-cpuinfo psutil portpicker six mock requests gast h5py astor==0.8.0 termcolor protobuf keras-applications keras-preprocessing wrapt google-pasta
sudo -H pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu==1.14.0
#Cython
sudo -H pip3 install cython
#keras-zoo
sudo apt-get install -y build-essential libatlas-base-dev gfortran
sudo -H pip3 install keras
#Pandas
sudo -H pip3 install pandas
#Scipy
sudo -H python3 -m pip install scipy==1.1.0
#Sklearn
sudo -H pip3 install scikit-learn
I had problems with Jupyter (Jetson TX2)
I checked which numpy version is used by Jupyter.
import numpy as np
np.version.version
In My case it was 1.13 despite the fact that
$ pip3 list
showed me version 1.16 for numpy
I found solution here https://fooobar.com/questions/15251639/jupyter-notebook-picks-older-version-of-numpy
to see the numpy path
print (np.__path__)
in my case it was /usr/lib/python3/dist-packages
went to the directory and removed old version numpy
$ cd /usr/lib/python3/dist-packages
$ sudo rm -r numpy
installed the relevant numpy version
$ sudo pip install numpy==1.16.1
that's all.
I'm trying to install PyAudio on my Raspbery Pi 3 using pip install pyaudio but I'm getting the following error:
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
Here are the full logs:
pip install pyaudio
Downloading/unpacking pyaudio
Downloading PyAudio-0.2.11.tar.gz
Running setup.py (path:/tmp/pip-build-u0HEK5/pyaudio/setup.py) egg_info for package pyaudio
Installing collected packages: pyaudio
Running setup.py install for pyaudio
building '_portaudio' extension
arm-linux-gnueabihf-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/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-armv7l-2.7/src/_portaudiomodule.o
src/_portaudiomodule.c:29:23: fatal error: portaudio.h: No such file or directory
#include "portaudio.h"
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-u0HEK5/pyaudio/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-g5l7H9-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
copying src/pyaudio.py -> build/lib.linux-armv7l-2.7
running build_ext
building '_portaudio' extension
creating build/temp.linux-armv7l-2.7
creating build/temp.linux-armv7l-2.7/src
arm-linux-gnueabihf-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/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-armv7l-2.7/src/_portaudiomodule.o
src/_portaudiomodule.c:29:23: fatal error: portaudio.h: No such file or directory
#include "portaudio.h"
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
Cleaning up...
Command /usr/bin/python -c "import setuptools,
tokenize;__file__='/tmp/pip-build-u0HEK5/pyaudio/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
'exec'))" install --record /tmp/pip-g5l7H9-record/install-record.txt
--single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-u0HEK5/pyaudio
Storing debug log for failure in /home/pi/.pip/pip.log
Note: this a Detailed steps for the installation, for faster installation please consider using #Julian's answer.
That is because you dont have proper prerequisites for the "pyaudio", and port audio header files are one of them.
so first install the prerequisites then your installation will succeed.
try the below commands first before installing pyaudio.
sudo apt-get update
sudo apt-get install libportaudio0 libportaudio2 libportaudiocpp0 portaudio19-dev
sudo apt-get install python-dev
after this now install pyaudio installation either from downloaded file or from a git repository
sudo pip install pyaudio
or
sudo apt-get install git
sudo git clone http://people.csail.mit.edu/hubert/git/pyaudio.git
cd pyaudio
sudo python setup.py install
anything else leave a comment below.
This is related to Pyaudio installation error - 'command 'gcc' failed with exit status 1'
Try the same solution:
sudo apt-get install python-pyaudio
I am trying to install pandas in an EC2 instance using the AWS linux distro for use with Python34.
I ran:
sudo pip install pandas
and I was able to successfully install pandas for the python 2.7 version but when I run:
sudo python34 -m pip install pandas
I get the error:
gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1
-DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Ipandas/_libs/src/klib -Ipandas/_libs/src -I/usr/local/lib64/python3.4/site-packages/numpy/core/include -I/usr/include/python3.4m -c pandas/_libs/index.c -o build/temp.linux-x86_64-3.4/pandas/_libs/index.o -Wno-unused-function
pandas/_libs/index.c:4:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
followed by:
Command "/usr/bin/python34 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zsa12w6w/pandas/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-svj_8okf-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-zsa12w6w/pandas/
How do I successfully install pandas for the python34 version?
I'm guessing you have an old version of pip, otherwise it would try to install via a wheel (binary dist). So one option would be to upgrade pip, then install pandas. (python34 -m pip install -U pip)
If you do want to build pandas from source, or any python c-extension, you need to install the python development headers, probably something like yum install python34-python-devel.x86_64