I'm trying to install pandas on my python3 installation. Version is 3.4.6, which seems to be the most up to date for this OS. I installed python with:
zypper in python3
I run the command:
pip3 install pandas
It gives me back a log, here is the part where the error is referenced:
gcc -pthread -Wno-unused-result -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fwrapv -DOPENSSL_LOAD_CONF -fPIC -Ipandas/_libs/src/klib -Ipandas/_libs/src -I/usr/lib64/python3.4/site-packages/numpy/core/include -I/usr/include/python3.4m -c pandas/_libs/tslib.c -o build/temp.linux-x86_64-3.4/pandas/_libs/tslib.o -Wno-unused-function
gcc: error: unrecognized command line option ‘-fstack-clash-protection’
error: command 'gcc' failed with exit status 1
Failed building wheel for pandas
Running setup.py clean for pandas
Failed to build pandas
Installing collected packages: pandas
Running setup.py install for pandas ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-xvndc9lz/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-record-nq8ffg3o/install-record.txt --single-version-externally-managed --compile:
Now, I've already googled around, there is a an issue on pip's github which references this problem, but none of the solutions worked.
https://github.com/pypa/pip/issues/5720
Solutions were updating gcc. Mine was initially at version 4.8 but i've already tried 4.9 and 5. Can't go higher than that because YAST is having trouble with dependencies and god know what else.
Any ideas? I think it must be something about the OS, because i've managed to install pandas in another machine, with another linux distro, same python, same gcc..
There is a gcc7 in the "Toolchain Module". SUSEconnect and/or YaST will allow to enable this extra package repository.
Related
I am using the latest version of Python3, and trying to install through the IntelliJ Terminal.
I have tried creating different env's, I updated all the possible packages: pip, wheel, scipy, numpy, setuptools, and even downloaded scikit-image separately. I also tried using the Mac Terminal, also the same error.
everytime I run the install command:
pip install ecapture
it shows me this error:
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Partial import of skimage during the build process.
error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/private/var/folders/lg/tmt9k7b1587_ppzl3xgptzx80000gn/T/pip-build-env-42dpn7e5/overlay/lib/python3.8/site-packages/numpy/core/include -I/Users/irina/venv/python3/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c skimage/_shared/geometry.c -o build/temp.macosx-10.14.6-x86_64-3.8/skimage/_shared/geometry.o -MMD -MF build/temp.macosx-10.14.6-x86_64-3.8/skimage/_shared/geometry.o.d" failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for scikit-image
Failed to build scikit-image
ERROR: Could not build wheels for scikit-image which use PEP 517 and cannot be installed directly
I have also rummaged around and tried to use --no-binary:
pip install ecapture --no-binary :all:
But again, it gives me the same error of not being able to build the wheels (expect this time, for cmake. Which I also downloaded, to no avail. )
I have been stuck on this for so long I am honestly considering throwing my laptop out of the nearest window.
As of 2020, installing scipy with pypy is possible. (Is it possible to install scipy under pypy?)
pypy3 -mpip install scipy
However, the wheel fails with this kind of error:
error: Command "g++ -pthread -DNDEBUG -O2 -fPIC -I/tmp/pip-build-env-lfdsn__t/overlay/site-packages/numpy/core/include -I/usr/lib/pypy3/include -c scipy/_lib/_uarray/_uarray_dispatch.cxx -o build/temp.linux-x86_64-3.6/scipy/_lib/_uarray/_uarray_dispatch.o -MMD -MF build/temp.linux-x86_64-3.6/scipy/_lib/_uarray/_uarray_dispatch.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
Using --no-use-pep517 option give similar result:
error: Command "g++ -pthread -DNDEBUG -O2 -fPIC -I/home/ezako/.local/lib/pypy3.6/site-packages/numpy/core/include -I/usr/lib/pypy3/include -c scipy/_lib/_uarray/_uarray_dispatch.cxx -o build/temp.linux-x86_64-3.6/scipy/_lib/_uarray/_uarray_dispatch.o -MMD -MF build/temp.linux-x86_64-3.6/scipy/_lib/_uarray/_uarray_dispatch.o.d -std=c++14 -fvisibility=hidden" failed with exit status 1
ERROR: Command errored out with exit status 1: /usr/bin/pypy3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2ffzze2v/scipy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2ffzze2v/scipy/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-8avik0f1/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/ezako/.local/include/python3.6/scipy Check the logs for full command output.
Numpy has been sucessfully installed with pypy3.
➜ pypy3 -V
Python 3.6.9 (7.3.0+dfsg-1~ppa1~ubuntu19.04, Dec 26 2019, 11:14:16)
[PyPy 7.3.0 with GCC 8.3.0]
Here is what worked for me. I unpacked the latest nightly
pypy -mensurepip
pypy -mpip install --upgrade pip setuptools wheel
pypy -mpip install numpy pybind11
pypy -mpip install scipy
Apparently you need to install pybind11 separately since it does not work properly in a PEP 517 isolated build.
I've got the same problem but none of the solutions that I found helped me.
I tried:
Upgrading pip
Downgrading pip
Use --no-cache-dir flag
Upgrading setuptools and wheel
Use --default-pip flag
Use --no-use-pep517 flag
So I try to install it manually with official manual and everything works fine.
git clone https://github.com/scipy/scipy.git
cd scipy
git submodule update --init
pypy -mpip install .
You may need to set BLAS, LAPACK and ATLAS libraries paths.
I'm trying to pip install tesserocr but encountering the below error.
I've tried a few different ways to install suggested on its doc, all of which with no avail.
At this point I'm certain the issue is not related to this package (since my friend installed it on the his Mac with no problems, I also installed on a Ubuntu VM w/o issue).
The error seems to be c++ library since it cannot find headers or in Tesseract-OCR's source code (?), however before the error line it successfully finds .
I also have pytesseract installed w/o issue.
I'm hoping somebody here can help debug what's causing this issue.
My tesseract (installed through brew) version is:
tesseract 4.0.0
leptonica-1.76.0
libjpeg 9c : libpng 1.6.35 : libtiff 4.0.9 : zlib 1.2.11
Thanks and let me know what other info you might need.
Failed building wheel for tesserocr
Running setup.py clean for tesserocr
Failed to build tesserocr
Installing collected packages: tesserocr
Running setup.py install for tesserocr ... error
Complete output from command /Users/charlieyou/miniconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/2h/ty244jbd1vd3d1l0m4k3_g980000gn/T/pip-install-wgh41bv0/tesserocr/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/2h/ty244jbd1vd3d1l0m4k3_g980000gn/T/pip-record-0grp17wc/install-record.txt --single-version-externally-managed --compile:
pkg-config failed to find tesseract/lept libraries: b"Package tesseract was not found in the pkg-config search path.\nPerhaps you should add the directory containing `tesseract.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'tesseract' found\n"
Supporting tesseract v4.0.0
Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 262144}}
running install
running build
running build_ext
building 'tesserocr' extension
creating build
creating build/temp.macosx-10.7-x86_64-3.6
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/charlieyou/miniconda3/include -arch x86_64 -I/Users/charlieyou/miniconda3/include -arch x86_64 -I/usr/local/include -I/Users/charlieyou/miniconda3/include/python3.6m -c tesserocr.cpp -o build/temp.macosx-10.7-x86_64-3.6/tesserocr.o -std=c++11 -DUSE_STD_NAMESPACE
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from tesserocr.cpp:603:
**/usr/local/include/tesseract/unichar.h:24:10: fatal error: 'cstring' file not found
#include <cstring>**
^~~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
I had the same problem on my mac,
You should try install the package with conda :
conda install -c mcs07 tesserocr
you can try : xcode-select --install
and I also can't install it , my error message is :
error: command '/usr/bin/clang' failed with exit status 1
I am trying to install a custom tensorflow 1.12 wheel on ppc64le
IBM Power9 system with NVIDIA Pascal V100 but getting the following error:
gcc -pthread -B /ccs/home/shubhankar/miniconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DH5_USE_16_API -I./h5py -I/tmp/pip-install-d__8pdpg/h5py/lzf -I/opt/local/include -I/usr/local/include -I/ccs/home/shubhankar/miniconda3/lib/python3.6/site-packages/numpy/core/include -I/ccs/home/shubhankar/miniconda3/include/python3.6m -c /tmp/pip-install-d__8pdpg/h5py/h5py/defs.c -o build/temp.linux-ppc64le-3.6/tmp/pip-install-d__8pdpg/h5py/h5py/defs.o
In file included from /ccs/home/shubhankar/miniconda3/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1821:0,
from /ccs/home/shubhankar/miniconda3/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /ccs/home/shubhankar/miniconda3/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from /tmp/pip-install-d__8pdpg/h5py/h5py/api_compat.h:26,
from /tmp/pip-install-d__8pdpg/h5py/h5py/defs.c:657:
/ccs/home/shubhankar/miniconda3/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^
In file included from /tmp/pip-install-d__8pdpg/h5py/h5py/defs.c:657:0:
/tmp/pip-install-d__8pdpg/h5py/h5py/api_compat.h:27:18: fatal error: hdf5.h: No such file or directory
#include "hdf5.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Rolling back uninstall of h5py
Command "/ccs/home/shubhankar/miniconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-d__8pdpg/h5py/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-5_3ofwib/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-d__8pdpg/h5py/
It breaks at the installation of h5py for some reason. It all starts with a warning message. I am not sure if it is related to it.
Cythonizing /tmp/pip-install-d__8pdpg/h5py/h5py/h5z.pyx
/tmp/pip-install-d__8pdpg/h5py/.eggs/Cython-0.29.1-py3.6-linux-ppc64le.egg/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-d__8pdpg/h5py/h5py/h5z.pxd
And finally
Rolling back uninstall of h5py
Command "/ccs/home/shubhankar/miniconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-d__8pdpg/h5py/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-5_3ofwib/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-d__8pdpg/h5py/
I am using miniconda3 for package management. The system installed gcc version is 4.8.5
You're installing tensorflow on a non-standard architecture (there are no precompiled wheels at PyPI) so pip has to compile everything (including dependencies, including h5py) from sources.
To compile h5py from sources you need to install HDF5 1.8.4 or newer with development headers. See http://docs.h5py.org/en/stable/build.html#source-installation for details.
Install libhdf5-dev using your OS' package manager if the package is available. Or install HDF5 from sources.
I am using both python Python 2.7.5 and Python 3.4.5. but I am working with Python 3.4.5
There are two users on this server. one user able to import pyodbc without issue. but other account not able to access pyodbc module.
-bash-4.2$ python3
Python 3.4.5 (default, May 29 2017, 15:17:55)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyodbc
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'pyodbc'
Below is pip version
-bash-4.2$ pip3 -V
pip 9.0.1 from /<path to lcaotion>/.local/lib/python3.4/site-packages
(python 3.4)
when try to install pyodbc
pip3 install pyodbc==3.0.10
Getting below error
-bash-4.2$ pip3 install pyodbc==3.0.10
Collecting pyodbc==3.0.10
Using cached pyodbc-3.0.10.tar.gz
Installing collected packages: pyodbc
Running setup.py install for pyodbc ... error
Complete output from command /usr/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yygzbf28/pyodbc/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-4w_3g87z-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'pyodbc' extension
creating build
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/tmp
creating build/temp.linux-x86_64-3.4/tmp/pip-build-yygzbf28
creating build/temp.linux-x86_64-3.4/tmp/pip-build-yygzbf28/pyodbc
creating build/temp.linux-x86_64-3.4/tmp/pip-build-yygzbf28/pyodbc/src
gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPYODBC_VERSION=3.0.10 -DPYODBC_UNICODE_WIDTH=4 -DSQL_WCHART_CONVERT=1 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include -I/usr/include/python3.4m -c /tmp/pip-build-yygzbf28/pyodbc/src/buffer.cpp -o build/temp.linux-x86_64-3.4/tmp/pip-build-yygzbf28/pyodbc/src/buffer.o -Wno-write-strings
In file included from /tmp/pip-build-yygzbf28/pyodbc/src/buffer.cpp:12:0:
/tmp/pip-build-yygzbf28/pyodbc/src/pyodbc.h:41:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
Below packages are installed in server
dbus-python.x86_64
libselinux-python.x86_64
newt-python.x86_64
python.x86_64
python-backports.noarch
python-backports-ssl_match_hostname.noarch
python-configobj.noarch
python-configshell.noarch
python-decorator.noarch
python-devel.x86_64
python-ethtool.x86_64
python-iniparse.noarch
python-kmod.x86_64
python-libs.x86_64
python-pcp.x86_64
python-pycurl.x86_64
python-pyudev.noarch
python-rtslib.noarch
python-setuptools.noarch
python-slip.noarch
python-slip-dbus.noarch
python-urlgrabber.noarch
python-urwid.x86_64
python2-crypto.x86_64
python34.x86_64
python34-libs.x86_64
python34-pip.noarch
python34-setuptools.noarch
rpm-python.x86_64
AND also when I tried to install as sudo permission I am getting below
sudo pip3 install pyodbc==3.0.10
Requirement already satisfied: pyodbc==3.0.10 in
/export/home/python/lib/python3.4/site-packages
The issue is unrelated to PIP
fatal error: Python.h: No such file or directory
You are missing your GCC (C++/C Compiler) and Development Tools from your machine - hence the missing C header file
You can install the following YUM group to satisfy the requirement:
RedHat / CentOS:
sudo yum group install "Development Tools"
or
sudo yum groupinstall "Development Tools"