I am trying to run a requirements.txt file that happens to have ReportLab as a dependency but I have not been successful. I have tried pip install reportlab but the version that is installed doesn't seem to work with the other dependencies. I have used pip install -r requirements.txt --no-cache as well as appending -vvv on that command but I still haven't been successful. Any help with this?
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 -Werror=implicit-function-declaration -DRENDERPM_FT -DLIBART_COMPILATION -DLIBART_VERSION="2.3.21" -Isrc/rl_addons/renderPM -Isrc/rl_addons/renderPM/libart_lgpl -Isrc/rl_addons/renderPM/gt1 -I/usr/local/include/freetype2 -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c src/rl_addons/renderPM/gt1/gt1-dict.c -o build/temp.macosx-10.14-x86_64-3.8/src/rl_addons/renderPM/gt1/gt1-dict.o
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 -Werror=implicit-function-declaration -DRENDERPM_FT -DLIBART_COMPILATION -DLIBART_VERSION="2.3.21" -Isrc/rl_addons/renderPM -Isrc/rl_addons/renderPM/libart_lgpl -Isrc/rl_addons/renderPM/gt1 -I/usr/local/include/freetype2 -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c src/rl_addons/renderPM/gt1/gt1-namecontext.c -o build/temp.macosx-10.14-x86_64-3.8/src/rl_addons/renderPM/gt1/gt1-namecontext.o
src/rl_addons/renderPM/gt1/gt1-namecontext.c:100:9: error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration]
len = strlen (s);
^
src/rl_addons/renderPM/gt1/gt1-namecontext.c:100:9: note: include the header <string.h> or explicitly provide a declaration for 'strlen'
src/rl_addons/renderPM/gt1/gt1-namecontext.c:102:3: error: implicitly declaring library function 'memcpy' with type 'void *(void *, const void *, unsigned long)' [-Werror,-Wimplicit-function-declaration]
memcpy (new, s, len);
^
src/rl_addons/renderPM/gt1/gt1-namecontext.c:102:3: note: include the header <string.h> or explicitly provide a declaration for 'memcpy'
src/rl_addons/renderPM/gt1/gt1-namecontext.c:172:10: error: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)' [-Werror,-Wimplicit-function-declaration]
if (!strcmp (nc->table[i & mask].name, name))
^
src/rl_addons/renderPM/gt1/gt1-namecontext.c:172:10: note: include the header <string.h> or explicitly provide a declaration for 'strcmp'
3 errors generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c0/p5ztz03d7yg8_hqxl6pfpskw0000gn/T/pip-install-xaveou5b/reportlab_a0c7466f687c456b8cf242c9beaeb10b/setup.py'"'"'; __file__='"'"'/private/var/folders/c0/p5ztz03d7yg8_hqxl6pfpskw0000gn/T/pip-install-xaveou5b/reportlab_a0c7466f687c456b8cf242c9beaeb10b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/c0/p5ztz03d7yg8_hqxl6pfpskw0000gn/T/pip-record-oqkx2tig/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/evapn/Library/Python/3.8/include/python3.8/reportlab Check the logs for full command output.
Related
i'm trying to install nltk
pip install nltk
or
pip3 install nltk
but i have errors Command errored out with exit status 1 and Py_UCS1 errors:
ERROR: Command errored out with exit status 1:
command: /Users/berendakova/PycharmProjects/search_info/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/qg/8463dw456dl28nrzkknf4lqw0000gp/T/pip-install-U4OtRD/regex/setup.py'"'"'; __file__='"'"'/private/var/folders/qg/8463dw456dl28nrzkknf4lqw0000gp/T/pip-install-U4OtRD/regex/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/qg/8463dw456dl28nrzkknf4lqw0000gp/T/pip-record-ne7kCE/install-record.txt --single-version-externally-managed --compile --install-headers /Users/berendakova/PycharmProjects/search_info/venv/include/site/python2.7/regex
cwd: /private/var/folders/qg/8463dw456dl28nrzkknf4lqw0000gp/T/pip-install-U4OtRD/regex/
Complete output (87 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.15-x86_64-2.7
creating build/lib.macosx-10.15-x86_64-2.7/regex
copying regex_3/__init__.py -> build/lib.macosx-10.15-x86_64-2.7/regex
copying regex_3/regex.py -> build/lib.macosx-10.15-x86_64-2.7/regex
copying regex_3/_regex_core.py -> build/lib.macosx-10.15-x86_64-2.7/regex
copying regex_3/test_regex.py -> build/lib.macosx-10.15-x86_64-2.7/regex
running build_ext
building 'regex._regex' extension
creating build/temp.macosx-10.15-x86_64-2.7
creating build/temp.macosx-10.15-x86_64-2.7/regex_3
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 -iwithsysroot /usr/local/libressl/include -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -pipe -I/Users/berendakova/PycharmProjects/search_info/venv/include/python2.7 -c regex_3/_regex.c -o build/temp.macosx-10.15-x86_64-2.7/regex_3/_regex.o
regex_3/_regex.c:755:23: error: expected expression
return *((Py_UCS1*)text + pos);
^
//MANY ERRORS WITH Py_UCS1
regex_3/_regex.c:2103:25: error: use of undeclared identifier 'PyExc_TimeoutError'; did you mean 'PyExc_ImportError'?
PyErr_SetString(PyExc_TimeoutError, "regex timed out");
^~~~~~~~~~~~~~~~~~
PyExc_ImportError
/Users/berendakova/PycharmProjects/search_info/venv/include/python2.7/pyerrors.h:134:24: note: 'PyExc_ImportError' declared here
PyAPI_DATA(PyObject *) PyExc_ImportError;
^
regex_3/_regex.c:3468:9: error: unknown type name 'Py_UCS1'; did you mean 'Py_UCS4'?
Py_UCS1* text_ptr;
^~~~~~~
Py_UCS4
/Users/berendakova/PycharmProjects/search_info/venv/include/python2.7/unicodeobject.h:128:22: note: 'Py_UCS4' declared here
typedef unsigned int Py_UCS4;
^
regex_3/_regex.c:3469:9: error: unknown type name 'Py_UCS1'; did you mean 'Py_UCS4'?
Py_UCS1* limit_ptr;
^~~~~~~
Py_UCS4
/Users/berendakova/PycharmProjects/search_info/venv/include/python2.7/unicodeobject.h:128:22: note: 'Py_UCS4' declared here
typedef unsigned int Py_UCS4;
^
regex_3/_regex.c:3471:29: error: expected expression
text_ptr = (Py_UCS1*)text + text_pos;
^
regex_3/_regex.c:3471:21: error: use of undeclared identifier 'Py_UCS1'
text_ptr = (Py_UCS1*)text + text_pos;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'cc' failed with exit status 1
i'm trying upgrade pip and trying use pip3, this is don't help me
i hope you can help me, thanks :)
I have a python script, and keep running into an error when trying to install a package.
I'm using pip 20.2.4 and python 3.7.7, on a MacOS Pro Catalina 10.15.7.
When I run pip install -r requirements.txt, it gets the below error. Any ideas on how to fix this?
Using legacy 'setup.py install' for psycopg2, since package 'wheel' is not installed.
Installing collected packages: psycopg2, psycopg2-binary
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
command: /Users/me/IdeaProjects/up/grafana/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tv/xmlxs5hd45s0n4r0qs5jtlhnbgpkgq/T/pip-install-z1c97jsm/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/tv/xmlxs5hd45s0n4r0qs5jtlhnbgpkgq/T/pip-install-z1c97jsm/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/tv/xmlxs5hd45s0n4r0qs5jtlhnbgpkgq/T/pip-record-984vc1rq/install-record.txt --single-version-externally-managed --compile --install-headers /Users/me/IdeaProjects/up/grafana/env/include/site/python3.7/psycopg2
cwd: /private/var/folders/tv/xmlxs5hd45s0n4r0qs5jtlhnbgpkgq/T/pip-install-z1c97jsm/psycopg2/
Complete output (151 lines):
running install
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
...
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.macosx-10.14-x86_64-3.7
creating build/temp.macosx-10.14-x86_64-3.7/psycopg
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework
...
I/usr/local/opt/sqlite/include -I/Users/me/IdeaProjects/up/grafana/env/include -I/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I. -I/usr/local/include -I/usr/local/include/postgresql/server -c psycopg/pqpath.c -o build/temp.macosx-10.14-x86_64-3.7/psycopg/pqpath.o
psycopg/pqpath.c:138:17: warning: implicit conversion from enumeration type 'ConnStatusType' to different enumeration type 'ExecStatusType' [-Wenum-conversion]
PQstatus(conn->pgconn) : PQresultStatus(*pgres)));
^~~~~~~~~~~~~~~~~~~~~~
psycopg/pqpath.c:1717:11: warning: code will never be executed [-Wunreachable-code]
ret = 1;
^
psycopg/pqpath.c:1822:17: warning: implicit conversion from enumeration type 'ConnStatusType' to different enumeration type 'ExecStatusType' [-Wenum-conversion]
PQstatus(curs->conn->pgconn) : PQresultStatus(curs->pgres)));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DPSYCOPG_VERSION=2.8.6 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130001 -DHAVE_LO64=1 -I/usr/local/include -I/usr/local/opt/openssl#1.1/include -I/usr/local/opt/sqlite/include -I/Users/me/IdeaProjects/up/grafana/env/include -
...
I/usr/local/opt/sqlite/include -I/Users/me/IdeaProjects/up/grafana/env/include -I/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I. -I/usr/local/include -I/usr/local/include/postgresql/server -c psycopg/microprotocols_proto.c -o build/temp.macosx-10.14-x86_64-3.7/psycopg/microprotocols_proto.o
In file included from psycopg/microprotocols_proto.c:28:
In file included from ./psycopg/psycopg.h:38:
./psycopg/config.h:82:13: warning: unused function 'Dprintf' [-Wunused-function]
static void Dprintf(const char *fmt, ...) {}
^
1 warning generated.
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g ...
L/usr/local/opt/sqlite/lib -L/usr/local/lib -lpq -lssl -lcrypto -o build/lib.macosx-10.14-x86_64-3.7/psycopg2/_psycopg.cpython-37m-darwin.so
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libSystem.tbd' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/me/IdeaProjects/up/grafana/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tv/xmlxs5hd45s0n4r0qs5jtlhnbgpkgq/T/pip-install-z1c97jsm/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/tv/xmlxs5hd45s0n4r0qs5jtlhnbgpkgq/T/pip-install-z1c97jsm/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/tv/xmlxs5hd45s0n4r0qs5jtlhnbgpkgq/T/pip-record-984vc1rq/install-record.txt --single-version-externally-managed --compile --install-headers /Users/me/IdeaProjects/up/grafana/env/include/site/python3.7/psycopg2 Check the logs for full command output.
I'm getting this kind of error and I was unable to find the right answer on the internet.
I tried to update the controller software of my NZXT Kraken water pump and it won't start now.
https://gitlab.com/leinardi/gkraken
I would be really thankful for some guidance.
Here is my full error:
Running setup.py install for hidapi ... error
ERROR: Complete output from command /usr/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-7z0im1kt/hidapi/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-ox5wudk7/install-record.txt --single-version-externally-managed --compile:
ERROR: running install
running build
running build_ext
cythoning hid.pyx to hid.c
/usr/local/lib64/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-7z0im1kt/hidapi/hid.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
cythoning hidraw.pyx to hidraw.c
/usr/local/lib64/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-7z0im1kt/hidapi/hidraw.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'hid' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/hidapi
creating build/temp.linux-x86_64-3.7/hidapi/libusb
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Ihidapi/hidapi -I/usr/include/libusb-1.0 -I/usr/include/python3.7m -c hid.c -o build/temp.linux-x86_64-3.7/hid.o
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Ihidapi/hidapi -I/usr/include/libusb-1.0 -I/usr/include/python3.7m -c hidapi/libusb/hid.c -o build/temp.linux-x86_64-3.7/hidapi/libusb/hid.o
hidapi/libusb/hid.c:26: warning: "_GNU_SOURCE" redefined
26 | #define _GNU_SOURCE /* needed for wcsdup() before glibc 2.10 */
|
<command-line>: note: this is the location of the previous definition
hidapi/libusb/hid.c:47:10: fatal error: libusb.h: No such file or directory
47 | #include <libusb.h>
| ^~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command "/usr/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-7z0im1kt/hidapi/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-ox5wudk7/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-7z0im1kt/hidapi/ ```
This was solved by running:
sudo dnf install libusbx-devel libudev-devel
I tried the command:
python3 -m pip install xlwings
But I got the following (long) error. The error is too long so i put only the end. Installation of other packages with the same command are working. Do somebody know how to solve that please?
...
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=567 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c psutil/_psutil_common.c -o build/temp.macosx-10.9-x86_64-3.7/psutil/_psutil_common.o
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=567 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c psutil/_psutil_posix.c -o build/temp.macosx-10.9-x86_64-3.7/psutil/_psutil_posix.o
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=567 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c psutil/_psutil_osx.c -o build/temp.macosx-10.9-x86_64-3.7/psutil/_psutil_osx.o
In file included from psutil/_psutil_osx.c:36:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
/usr/local/include/Block.h:16:3: error: Never include this file directly. Use <lzma.h> instead.
# error Never include this file directly. Use <lzma.h> instead.
^
/usr/local/include/Block.h:93:2: error: unknown type name 'lzma_check'
lzma_check check;
^
...
lzma_bool reserved_bool2;
^
/usr/local/include/Block.h:264:2: error: unknown type name 'lzma_bool'
lzma_bool reserved_bool3;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for psutil
Running setup.py clean for psutil
Failed to build psutil
Installing collected packages: psutil, xlwings
Running setup.py install for psutil ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/cy/jtv0bpc11vsbbmfhjzz5zlz00000gr/T/pip-install-3i68cw09/psutil/setup.py'"'"'; __file__='"'"'/private/var/folders/cy/jtv0bpc11vsbbmfhjzz5zlz00000gr/T/pip-install-3i68cw09/psutil/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/cy/jtv0bpc11vsbbmfhjzz5zlz00000gr/T/pip-record-k62qhrl9/install-record.txt --single-version-externally-managed --compile
cwd: /private/var/folders/cy/jtv0bpc11vsbbmfhjzz5zlz00000gr/T/pip-install-3i68cw09/psutil/
Complete output (106 lines):
...
creating build/temp.macosx-10.9-x86_64-3.7/psutil/arch
creating build/temp.macosx-10.9-x86_64-3.7/psutil/arch/osx
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=567 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c psutil/_psutil_common.c -o build/temp.macosx-10.9-x86_64-3.7/psutil/_psutil_common.o
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=567 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c psutil/_psutil_posix.c -o build/temp.macosx-10.9-x86_64-3.7/psutil/_psutil_posix.o
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=567 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c psutil/_psutil_osx.c -o build/temp.macosx-10.9-x86_64-3.7/psutil/_psutil_osx.o
In file included from psutil/_psutil_osx.c:36:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
/usr/local/include/Block.h:16:3: error: Never include this file directly. Use <lzma.h> instead.
# error Never include this file directly. Use <lzma.h> instead.
^
/usr/local/include/Block.h:93:2: error: unknown type name 'lzma_check'
lzma_check check;
...
lzma_bool ignore_check;
^
/usr/local/include/Block.h:263:2: error: unknown type name 'lzma_bool'
lzma_bool reserved_bool2;
^
/usr/local/include/Block.h:264:2: error: unknown type name 'lzma_bool'
lzma_bool reserved_bool3;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/cy/jtv0bpc11vsbbmfhjzz5zlz00000gr/T/pip-install-3i68cw09/psutil/setup.py'"'"'; __file__='"'"'/private/var/folders/cy/jtv0bpc11vsbbmfhjzz5zlz00000gr/T/pip-install-3i68cw09/psutil/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/cy/jtv0bpc11vsbbmfhjzz5zlz00000gr/T/pip-record-k62qhrl9/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
EDIT: I have added part of the error as it could be useful.
I had to cut the error as it is not accepted because too long.
I am trying to install an alternative regular expression module to replace re but am having difficulty installing the module. I have already visited this stack overflow question and when following Pavan's instructions, Terminal (I'm running OSX El Capitan) produces the following output:
Edit: To clarify, this output was produced when the command pip install regex was issued.
Collecting regex
Using cached regex-2016.04.15.tar.gz
Installing collected packages: regex
Running setup.py install for regex ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/z6/vncx8j5977xd96vnrtj41xt40000gn/T/pip-build-AwqJ7Z/regex/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/z6/vncx8j5977xd96vnrtj41xt40000gn/T/pip-uG2qOh-record/install-record.txt --single-version-externally-managed --compile:
/Library/Python/2.7/site-packages/setuptools-20.9.0-py2.7.egg/setuptools/dist.py:285: UserWarning: Normalizing '2016.04.15' to '2016.4.15'
running install
running build
running build_py
creating build
creating build/lib.macosx-10.11-intel-2.7
copying Python2/regex.py -> build/lib.macosx-10.11-intel-2.7
copying Python2/_regex_core.py -> build/lib.macosx-10.11-intel-2.7
copying Python2/test_regex.py -> build/lib.macosx-10.11-intel-2.7
running build_ext
building '_regex' extension
creating build/temp.macosx-10.11-intel-2.7
creating build/temp.macosx-10.11-intel-2.7/Python2
cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -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 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c Python2/_regex.c -o build/temp.macosx-10.11-intel-2.7/Python2/_regex.o
Python2/_regex.c:16531:77: warning: '&&' within '||' [-Wlogical-op-parentheses]
if (state->total_errors < error_limit || i == 0 &&
~~ ~~~~~~~^~
Python2/_regex.c:16531:77: note: place parentheses around the '&&' expression to silence this warning
if (state->total_errors < error_limit || i == 0 &&
^
Python2/_regex.c:16534:38: warning: variable 'better' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
else if (state->total_errors == error_limit)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Python2/_regex.c:16542:33: note: uninitialized use occurs here
if (better) {
^~~~~~
Python2/_regex.c:16534:34: note: remove the 'if' if its condition is always true
else if (state->total_errors == error_limit)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Python2/_regex.c:16529:40: note: initialize the variable 'better' to silence this warning
BOOL better;
^
= '\0'
Python2/_regex.c:18564:28: warning: unused function 'match_get_group_dict' [-Wunused-function]
Py_LOCAL_INLINE(PyObject*) match_get_group_dict(MatchObject* self) {
^
3 warnings generated.
Python2/_regex.c:16531:77: warning: '&&' within '||' [-Wlogical-op-parentheses]
if (state->total_errors < error_limit || i == 0 &&
~~ ~~~~~~~^~
Python2/_regex.c:16531:77: note: place parentheses around the '&&' expression to silence this warning
if (state->total_errors < error_limit || i == 0 &&
^
Python2/_regex.c:16534:38: warning: variable 'better' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
else if (state->total_errors == error_limit)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Python2/_regex.c:16542:33: note: uninitialized use occurs here
if (better) {
^~~~~~
Python2/_regex.c:16534:34: note: remove the 'if' if its condition is always true
else if (state->total_errors == error_limit)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Python2/_regex.c:16529:40: note: initialize the variable 'better' to silence this warning
BOOL better;
^
= '\0'
Python2/_regex.c:18564:28: warning: unused function 'match_get_group_dict' [-Wunused-function]
Py_LOCAL_INLINE(PyObject*) match_get_group_dict(MatchObject* self) {
^
3 warnings generated.
cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -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 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c Python2/_regex_unicode.c -o build/temp.macosx-10.11-intel-2.7/Python2/_regex_unicode.o
cc -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -Wl,-F. build/temp.macosx-10.11-intel-2.7/Python2/_regex.o build/temp.macosx-10.11-intel-2.7/Python2/_regex_unicode.o -o build/lib.macosx-10.11-intel-2.7/_regex.so
running install_lib
copying build/lib.macosx-10.11-intel-2.7/_regex.so -> /Library/Python/2.7/site-packages
error: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/_regex.so'
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/z6/vncx8j5977xd96vnrtj41xt40000gn/T/pip-build-AwqJ7Z/regex/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/z6/vncx8j5977xd96vnrtj41xt40000gn/T/pip-uG2qOh-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/z6/vncx8j5977xd96vnrtj41xt40000gn/T/pip-build-AwqJ7Z/regex/
Looks like a C compiler got grumpy and threw a tantrum, any help is greatly appreciated.
This is not a compile problem. You are executing pip as user with not enough privileges:
Permission denied: '/Library/Python/2.7/site-packages/_regex.so'
Run as root:
$ sudo pip install regex