Issue installing pdftotext in Python 3.6 on CentOS due to poppler - linux

I'm having some issues getting installing pdftotext in Python 3.6 (Anaconda 5.1.0) on CentOS.
Some quick notes first:
I'm using CentOS 6.7 on VirtualBox
I know it can work because my IT group has it installed on our server. NOTE: I found that our server did have the C++ wrapper installed and I'm trying to figure out how the got it.
I'm trying to get an existing application to work, so I'm not looking for an alternative to pdftotext the library at this time.
I followed the instructions from the github repo and already tried this step:
Fedora, Red Hat, and friends:
sudo yum install gcc-c++ pkgconfig poppler-cpp-devel python-devel redhat-rpm-config
But the problem seems to be around poppler-cpp-devel. I don't see that package within yum search poppler:
============================= N/S Matched: poppler =============================
poppler-devel.i686 : Libraries and headers for poppler
poppler-devel.x86_64 : Libraries and headers for poppler
poppler-glib.i686 : Glib wrapper for poppler
poppler-glib.x86_64 : Glib wrapper for poppler
poppler-qt.i686 : Qt3 wrapper for poppler
poppler-qt.x86_64 : Qt3 wrapper for poppler
poppler-qt4.i686 : Qt4 wrapper for poppler
poppler-qt4.x86_64 : Qt4 wrapper for poppler
poppler.i686 : PDF rendering library
poppler.x86_64 : PDF rendering library
poppler-data.noarch : Encoding files
poppler-glib-devel.i686 : Development files for glib wrapper
poppler-glib-devel.x86_64 : Development files for glib wrapper
poppler-qt-devel.i686 : Development files for Qt3 wrapper
poppler-qt-devel.x86_64 : Development files for Qt3 wrapper
poppler-qt4-devel.i686 : Development files for Qt4 wrapper
poppler-qt4-devel.x86_64 : Development files for Qt4 wrapper
poppler-utils.x86_64 : Command line utilities for converting PDF files
My IT group gave me the instructions of what they had attempted and I tried installing poppler-devel and poppler-glib. But every time I try pip install pdftotext I'm getting the following output:
[root#localhost stack]# pip install pdftotext
Collecting pdftotext
Using cached https://files.pythonhosted.org/packages/21/35/60094dbadd9de2035873390b1cac25e01da605844eba6a07a53a82fa4adc/pdftotext-2.1.1.tar.gz
Building wheels for collected packages: pdftotext
Building wheel for pdftotext (setup.py) ... error
Complete output from command /root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-1mu2f1n2/pdftotext/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-khm9zova --python-tag cp36:
/root/anaconda3/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running bdist_wheel
running build
running build_ext
building 'pdftotext' extension
creating build
creating build/temp.linux-x86_64-3.6
gcc -pthread -B /root/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPOPPLER_CPP_AT_LEAST_0_30_0=0 -I/root/anaconda3/include/python3.6m -c pdftotext.cpp -o build/temp.linux-x86_64-3.6/pdftotext.o -Wall
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
pdftotext.cpp:3:42: error: poppler/cpp/poppler-document.h: No such file or directory
pdftotext.cpp:4:40: error: poppler/cpp/poppler-global.h: No such file or directory
pdftotext.cpp:5:38: error: poppler/cpp/poppler-page.h: No such file or directory
pdftotext.cpp:20: error: ‘poppler’ has not been declared
pdftotext.cpp:20: error: ISO C++ forbids declaration of ‘document’ with no type
pdftotext.cpp:20: error: expected ‘;’ before ‘*’ token
pdftotext.cpp: In function ‘void PDF_clear(PDF*)’:
pdftotext.cpp:26: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:27: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_create_doc(PDF*)’:
pdftotext.cpp:66: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:66: error: ‘poppler’ has not been declared
pdftotext.cpp:67: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_unlock(PDF*, char*)’:
pdftotext.cpp:75: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_init(PDF*, PyObject*, PyObject*)’:
pdftotext.cpp:105: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘PyObject* PDF_read_page(PDF*, int)’:
pdftotext.cpp:119: error: ‘poppler’ has not been declared
pdftotext.cpp:119: error: expected initializer before ‘*’ token
pdftotext.cpp:120: error: ‘poppler’ has not been declared
pdftotext.cpp:120: error: expected ‘;’ before ‘layout_mode’
pdftotext.cpp:123: error: ‘page’ was not declared in this scope
pdftotext.cpp:123: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:129: error: ‘poppler’ has not been declared
pdftotext.cpp:129: error: expected initializer before ‘rect’
pdftotext.cpp:130: error: ‘rect’ was not declared in this scope
pdftotext.cpp:133: error: ‘layout_mode’ was not declared in this scope
pdftotext.cpp:133: error: ‘poppler’ has not been declared
pdftotext.cpp:135: error: ‘poppler’ has not been declared
pdftotext.cpp:137: error: ‘poppler’ has not been declared
pdftotext.cpp:138: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pdftotext
Running setup.py clean for pdftotext
Failed to build pdftotext
Installing collected packages: pdftotext
Running setup.py install for pdftotext ... error
Complete output from command /root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-1mu2f1n2/pdftotext/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-ghuhvuhl/install-record.txt --single-version-externally-managed --compile:
/root/anaconda3/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running build
running build_ext
building 'pdftotext' extension
creating build
creating build/temp.linux-x86_64-3.6
gcc -pthread -B /root/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPOPPLER_CPP_AT_LEAST_0_30_0=0 -I/root/anaconda3/include/python3.6m -c pdftotext.cpp -o build/temp.linux-x86_64-3.6/pdftotext.o -Wall
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
pdftotext.cpp:3:42: error: poppler/cpp/poppler-document.h: No such file or directory
pdftotext.cpp:4:40: error: poppler/cpp/poppler-global.h: No such file or directory
pdftotext.cpp:5:38: error: poppler/cpp/poppler-page.h: No such file or directory
pdftotext.cpp:20: error: ‘poppler’ has not been declared
pdftotext.cpp:20: error: ISO C++ forbids declaration of ‘document’ with no type
pdftotext.cpp:20: error: expected ‘;’ before ‘*’ token
pdftotext.cpp: In function ‘void PDF_clear(PDF*)’:
pdftotext.cpp:26: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:27: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_create_doc(PDF*)’:
pdftotext.cpp:66: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:66: error: ‘poppler’ has not been declared
pdftotext.cpp:67: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_unlock(PDF*, char*)’:
pdftotext.cpp:75: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_init(PDF*, PyObject*, PyObject*)’:
pdftotext.cpp:105: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘PyObject* PDF_read_page(PDF*, int)’:
pdftotext.cpp:119: error: ‘poppler’ has not been declared
pdftotext.cpp:119: error: expected initializer before ‘*’ token
pdftotext.cpp:120: error: ‘poppler’ has not been declared
pdftotext.cpp:120: error: expected ‘;’ before ‘layout_mode’
pdftotext.cpp:123: error: ‘page’ was not declared in this scope
pdftotext.cpp:123: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:129: error: ‘poppler’ has not been declared
pdftotext.cpp:129: error: expected initializer before ‘rect’
pdftotext.cpp:130: error: ‘rect’ was not declared in this scope
pdftotext.cpp:133: error: ‘layout_mode’ was not declared in this scope
pdftotext.cpp:133: error: ‘poppler’ has not been declared
pdftotext.cpp:135: error: ‘poppler’ has not been declared
pdftotext.cpp:137: error: ‘poppler’ has not been declared
pdftotext.cpp:138: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-1mu2f1n2/pdftotext/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-ghuhvuhl/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-1mu2f1n2/pdftotext/
I'm assuming the problem here is that it's looking for the C++ compiled files and I could only get the glib?
What I can look into?

pdftotext should be in poppler-utils, so try yum install poppler-utils
EDIT: Hmm. There's a package called pypoppler available for CentOS 6 in the EPEL repository, which describes itself as "Python bindings for the Poppler PDF rendering library." I see no indication that it includes poppler/cpp/{anything}, but you can give it a try. (You may need to install pycairo first.)
Failing that, you might try installing an earlier version of pdftotext (e.g. pip install pdftotext==1.0.0) to find one compatible with CentOS 6. The earliest version came out in June of 2017, though, so that may not help.
I don't suppose you're interested in upgrading to CentOS 7?

There actually is a proper CentOS 7 package. It is not enough to install the poppler-devel package as it does not include the CPP header files that is required and you simply need to install the poppler-cpp and poppler-cpp-devel packages:
yum install poppler-cpp poppler-cpp-devel
After this you can pip/pip3 install the pdftotext package without custom compiling and setting environment path variables.

I found the solution to this. By following the instructions for installing libpoppler-cpp from this link, I was able to successfully install the pdftotext.
Following the instructions from this repo:
On CentOS
On CentOS the libpoppler-cpp library is not included with the system so we need to build from source. Note that recent versions of poppler require C++11 which is not available on CentOS, so we build a slightly older version of libpoppler.
# Build dependencies
yum install wget xz libjpeg-devel openjpeg2-devel
# Download and extract
wget https://poppler.freedesktop.org/poppler-0.47.0.tar.xz
tar -Jxvf poppler-0.47.0.tar.xz
cd poppler-0.47.0
# Build and install
./configure
make
sudo make install
By default libraries get installed in /usr/local/lib and /usr/local/include. On CentOS this is not a default search path so we need to set PKG_CONFIG_PATH and LD_LIBRARY_PATH to point R to the right directory:
export LD_LIBRARY_PATH="/usr/local/lib"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"

Related

Why I'm getting build wheel error when installing package on Linux

I am working on installing a repository on my Linux and can't seem to download a package correctly. For background, I am a grad research assistant and my post doc is building a package he wants me to test. It's a new version so it could be the package issue but I am also new to coding and it might just be me/my computer.
I am trying pip install rsnapsim-ssa-cpp
I double checked that I have cpp on my computer (which is g++ on linux i gathered) and it is up to date.
It starts working but when it gets to build wheel, it breaks down.
The main error, at end of all the error code is,
ERROR: Could not build wheels for rsnapsim-ssa-cpp which use PEP 517 and cannot be installed directly
The full description of error is below
(base) bsilagy#ENS12372 ~ $ pip install rsnapsim-ssa-cpp
Collecting rsnapsim-ssa-cpp
Using cached rsnapsim_ssa_cpp-0.0.12.tar.gz (97 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: numpy in ./anaconda3/lib/python3.8/site-packages (from rsnapsim-ssa-cpp) (1.20.1)
Requirement already satisfied: Cython>=0.26.0 in ./anaconda3/lib/python3.8/site-packages (from rsnapsim-ssa-cpp) (0.29.21)
Building wheels for collected packages: rsnapsim-ssa-cpp
Building wheel for rsnapsim-ssa-cpp (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /home/bsilagy/anaconda3/bin/python /home/bsilagy/anaconda3/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpyouz1bwc
cwd: /tmp/pip-install-ax10ddh9/rsnapsim-ssa-cpp
Complete output (50 lines):
Warning: passing language='c++' to cythonize() is deprecated. Instead, put "# distutils: language=c++" in your .pyx or .pxd file(s)
/home/bsilagy/anaconda3
Located eigen3/Eigen/Dense:
['/home/bsilagy/anaconda3/include', '/home/bsilagy/anaconda3/pkgs/eigen-3.3.7-hfd86e86_0/include']
running bdist_wheel
running build
running build_ext
skipping 'ssa_translation_lowmem.cpp' Cython extension (up-to-date)
building 'ssa_translation_lowmem' extension
creating build
creating build/temp.linux-x86_64-3.8
gcc -pthread -B /home/bsilagy/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/bsilagy/anaconda3/include/python3.8 -I/tmp/pip-build-env-tq8h27ra/overlay/lib/python3.8/site-packages/numpy/core/include -I. -I/tmp/pip-install-ax10ddh9/rsnapsim-ssa-cpp -I/home/bsilagy/anaconda3/include -I/home/bsilagy/anaconda3/include/python3.8 -c ssa_translation_c_w_full.cpp -o build/temp.linux-x86_64-3.8/ssa_translation_c_w_full.o -I. -I./Include -I/home/bsilagy/anaconda3/include
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /usr/include/c++/5/random:35:0,
from ssa_translation_c_w_full.cpp:7:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
^
ssa_translation_c_w_full.cpp: In function ‘void translationSSA_full(int*, double*, double*, int, double, double, int*, int, int, int, double, int, double*, int*, int, int, int*, int, int*, double*, int*, int, int*, int, int*, int, int*, double, double, double*, int*, int*, int)’:
ssa_translation_c_w_full.cpp:69:2: error: ‘mt19937_64’ is not a member of ‘std’
std::mt19937_64 rng;
^
ssa_translation_c_w_full.cpp:74:5: error: ‘rng’ was not declared in this scope
rng.seed(seed);
^
ssa_translation_c_w_full.cpp:75:2: error: ‘uniform_real_distribution’ is not a member of ‘std’
std::uniform_real_distribution<double> unif(0, 1);
^
ssa_translation_c_w_full.cpp:75:33: error: expected primary-expression before ‘double’
std::uniform_real_distribution<double> unif(0, 1);
^
ssa_translation_c_w_full.cpp:138:16: error: ‘unif’ was not declared in this scope
r1 = unif(rng);
^
ssa_translation_c_w_full.cpp:141:8: warning: unused variable ‘burst’ [-Wunused-variable]
int burst = 1;
^
ssa_translation_c_w_full.cpp:139:7: warning: unused variable ‘burst’ [-Wunused-variable]
int burst = 0; // is the system bursting on or off_type with proprotion to kon / koff
^
ssa_translation_c_w_full.cpp:218:19: error: ‘unif’ was not declared in this scope
r1 = unif(rng);
^
ssa_translation_c_w_full.cpp:295:23: error: ‘unif’ was not declared in this scope
r1 = unif(rng);
^
ssa_translation_c_w_full.cpp:127:9: warning: unused variable ‘NR’ [-Wunused-variable]
int NR = 0;
^
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for rsnapsim-ssa-cpp
Failed to build rsnapsim-ssa-cpp
ERROR: Could not build wheels for rsnapsim-ssa-cpp which use PEP 517 and cannot be installed directly
Can someone please help/advise?

Error while creating wheel while installing packages in Mac

This is the error I receive while installing packages from a file using pip install -r req.txt
Then it tried building wheels for collected packages: blis; cytoolz; murmurhash; preshed; regex, and I got a long error list.
typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */
^
note: '__uint128_t' declared here
In file included from Python3/_regex.c:46:
In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:71:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_wctype_t;
^
note: '__uint128_t' declared here
In file included from Python3/_regex.c:46:
In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:75:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h:31:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h:37:2: error: architecture not supported
#error architecture not supported
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'xcrun' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for regex```
Is something wrong with MacOS side because it is giving me bizarre errors.
Any leads appreciated.

How to fix error pip install twisted on mac?

I am trying to pip install twisted on mac 10.15.6, python 3.8
Got a bunch of architecture not supported errors (for example, __uint32_t unknown).
Here is the output when I run pip install twisted:
xcrun -sdk macosx 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/Users/damon/workspace/trial/crawlers/venv/include -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c src/twisted/test/raiser.c -o build/temp.macosx-10.14.6-x86_64-3.8/src/twisted/test/raiser.o
In file included from src/twisted/test/raiser.c:4:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/limits.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/limits.h:63:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
#error Unsupported architecture
^
In file included from src/twisted/test/raiser.c:4:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/limits.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/limits.h:64:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/machine/limits.h:8:2: error: architecture not supported
#error architecture not supported
^
In file included from src/twisted/test/raiser.c:4:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
^
In file included from src/twisted/test/raiser.c:4:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
typedef __int64_t __darwin_blkcnt_t; /* total blocks */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_blksize_t; /* preferred block size */
^
note: '__int128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_dev_t; /* dev_t */
^
note: '__int128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */
^
note: '__uint128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/
^
note: '__uint128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */
^
note: '__uint128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */
^
note: '__int128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_sigset_t; /* [???] signal set */
^
note: '__uint128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */
^
note: '__int128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_uid_t; /* [???] user IDs */
^
note: '__uint128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */
^
note: '__uint128_t' declared here
In file included from src/twisted/test/raiser.c:4:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_wctype_t;
^
note: '__uint128_t' declared here
In file included from src/twisted/test/raiser.c:4:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:75:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_va_list.h:31:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error: architecture not supported
#error architecture not supported
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'xcrun' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/damon/workspace/trial/crawlers/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/qh/fkxm282s3b5288r2gkxmnwwh0000gq/T/pycharm-packaging/twisted/setup.py'"'"'; __file__='"'"'/private/var/folders/qh/fkxm282s3b5288r2gkxmnwwh0000gq/T/pycharm-packaging/twisted/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/qh/fkxm282s3b5288r2gkxmnwwh0000gq/T/pip-record-qj5hygum/install-record.txt --single-version-externally-managed --compile --install-headers /Users/damon/workspace/trial/crawlers/venv/include/site/python3.8/Twisted Check the logs for full command output.
Any help is appreciated.
Thank you!
Make sure you have xcode installed
xcode-select --install
also check the python version , I found it to work on 3.8.5 but failed on 3.8.2
By upgrade python to 3.8.5 (from 3.8.2) I successfully install twisted with pip.I install new version python with offical installer.python.org But I stuck for a long time for not find python3 linkto new install path.Finally I restart my terminal and find python3 link to new version.LOL

In the centos6.5 system deployment gym environment error

I installed and deployed the gym on the centos6.5 system. The following is the installation process.
Install anaconda
Wget --no-check-certificate https://repo.anaconda.com/archive/Anaconda3-5.1.0-Linux-x86_64.sh
Create a virtual environment
Conda create --name gymlab python=3.6
Install gym
Source activate gym
Git clone https://github.com/openai/gym.git
Cd gym
Pip install '.[all]'
Run "pip install '.[all]' "The last step, reported the following error:
Processing /root/gym
Requirement already satisfied: numpy>=1.10.4 in /root/anaconda3/envs/gymlab/lib/python3.6/site-packages (from gym==0.10.5) (1.14.3)
Requirement already satisfied: requests>=2.0 in /root/anaconda3/envs/gymlab/lib/python3.6/site-packages (from gym==0.10.5) (2.18.4)
Requirement already satisfied: six in /root/anaconda3/envs/gymlab/lib/python3.6/site-packages (from gym==0.10.5) (1.11.0)
Requirement already satisfied: pyglet>=1.2.0 in /root/anaconda3/envs/gymlab/lib/python3.6/site-packages (from gym==0.10.5) (1.3.2)
Requirement already satisfied: atari_py>=0.1.1 in /root/anaconda3/envs/gymlab/lib/python3.6/site-packages (from gym==0.10.5) (0.1.1)
Requirement already satisfied: Pillow in /root/anaconda3/envs/gymlab/lib/python3.6/site-packages (from gym==0.10.5) (5.1.0)
Requirement already satisfied: PyOpenGL in /root/anaconda3/envs/gymlab/lib/python3.6/site-packages (from gym==0.10.5) (3.1.0)
Collecting Box2D-kengz (from gym==0.10.5)
Using cached https://files.pythonhosted.org/packages/81/20/51d6c0c87f7642efb709c518fb0ca8e5eab068259588552c41da5926ae27/Box2D-kengz-2.3.3.tar.gz
Collecting mujoco_py>=1.50 (from gym==0.10.5)
Collecting imageio (from gym==0.10.5)
Using cached https://files.pythonhosted.org/packages/a7/1d/33c8686072148b3b0fcc12a2e0857dd8316b8ae20a0fa66c8d6a6d01c05c/imageio-2.3.0-py2.py3-none-any.whl
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /root/anaconda3/envs/gymlab/lib/python3.6/site-packages (from requests>=2.0->gym==0.10.5) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /root/anaconda3/envs/gymlab/lib/python3.6/site-packages (from requests>=2.0->gym==0.10.5) (2018.4.16)
Requirement already satisfied: idna<2.7,>=2.5 in /root/anaconda3/envs/gymlab/lib/python3.6/site-packages (from requests>=2.0->gym==0.10.5) (2.6)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /root/anaconda3/envs/gymlab/lib/python3.6/site-packages (from requests>=2.0->gym==0.10.5) (1.22)
Requirement already satisfied: future in /root/anaconda3/envs/gymlab/lib/python3.6/site-packages (from pyglet>=1.2.0->gym==0.10.5) (0.16.0)
Collecting glfw>=1.4.0 (from mujoco_py>=1.50->gym==0.10.5)
Collecting cffi>=1.10 (from mujoco_py>=1.50->gym==0.10.5)
Using cached https://files.pythonhosted.org/packages/6d/c0/47db8f624f3e4e2f3f27be03a93379d1ba16a1450a7b1aacfa0366e2c0dd/cffi-1.11.5-cp36-cp36m-manylinux1_x86_64.whl
Collecting Cython>=0.27.2 (from mujoco_py>=1.50->gym==0.10.5)
Using cached https://files.pythonhosted.org/packages/19/eb/c4d9f3beafd5ac0615936860bcee41d93ca58f8734a16715da0037d2c468/Cython-0.28.2-cp36-cp36m-manylinux1_x86_64.whl
Collecting pycparser (from cffi>=1.10->mujoco_py>=1.50->gym==0.10.5)
Building wheels for collected packages: gym, Box2D-kengz
Running setup.py bdist_wheel for gym ... done
Stored in directory: /tmp/pip-ephem-wheel-cache-or4iim1z/wheels/6e/18/10/1234738b0aafab3f8f70d61d2763dc3efda78a41d153584dee
Running setup.py bdist_wheel for Box2D-kengz ... error
Complete output from command /root/anaconda3/envs/gymlab/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-5jh8n6q7/Box2D-kengz/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-ckydr3cn --python-tag cp36:
Using setuptools (version 39.1.0).
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/Box2D
copying library/Box2D/Box2D.py -> build/lib.linux-x86_64-3.6/Box2D
copying library/Box2D/init.py -> build/lib.linux-x86_64-3.6/Box2D
creating build/lib.linux-x86_64-3.6/Box2D/b2
copying library/Box2D/b2/init.py -> build/lib.linux-x86_64-3.6/Box2D/b2
running build_ext
building 'Box2D._Box2D' extension
swigging Box2D/Box2D.i to Box2D/Box2D_wrap.cpp
swig -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library/Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D/Box2D_wrap.cpp Box2D/Box2D.i
Box2D/Common/b2Math.h:66: Warning(302): Identifier 'b2Vec2' redefined by %extend (ignored),
Box2D/Box2D_math.i:47: Warning(302): %extend definition of 'b2Vec2'.
Box2D/Common/b2Math.h:157: Warning(302): Identifier 'b2Vec3' redefined by %extend (ignored),
Box2D/Box2D_math.i:168: Warning(302): %extend definition of 'b2Vec3'.
Box2D/Common/b2Math.h:196: Warning(302): Identifier 'b2Mat22' redefined by %extend (ignored),
Box2D/Box2D_math.i:301: Warning(302): %extend definition of 'b2Mat22'.
Box2D/Common/b2Math.h:270: Warning(302): Identifier 'b2Mat33' redefined by %extend (ignored),
Box2D/Box2D_math.i:372: Warning(302): %extend definition of 'b2Mat33'.
Box2D/Collision/b2DynamicTree.h:43: Warning(312): Nested union not currently supported (ignored).
Box2D/Common/b2Settings.h:144: Warning(506): Can't wrap varargs with keyword arguments enabled
Box2D/Common/b2Math.h:90: Warning(509): Overloaded method b2Vec2::operator ()(int32) is shadowed by b2Vec2::operator ()(int32) const at Box2D/Common/b2Math.h:84.
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/Box2D
creating build/temp.linux-x86_64-3.6/Box2D/Dynamics
creating build/temp.linux-x86_64-3.6/Box2D/Dynamics/Contacts
creating build/temp.linux-x86_64-3.6/Box2D/Dynamics/Joints
creating build/temp.linux-x86_64-3.6/Box2D/Common
creating build/temp.linux-x86_64-3.6/Box2D/Collision
creating build/temp.linux-x86_64-3.6/Box2D/Collision/Shapes
gcc -pthread -B /root/anaconda3/envs/gymlab/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/gymlab/include/python3.6m -c Box2D/Box2D_wrap.cpp -o build/temp.linux-x86_64-3.6/Box2D/Box2D_wrap.o -I. -Wno-unused
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
Box2D/Box2D_wrap.cpp: In function ‘swig_module_info* SWIG_Python_GetModule()’:
Box2D/Box2D_wrap.cpp:2453:51: error: ‘PyCObject_Import’ was not declared in this scope
(char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
^
Box2D/Box2D_wrap.cpp: In function ‘void SWIG_Python_SetModule(swig_module_info*)’:
Box2D/Box2D_wrap.cpp:2522:92: error: ‘PyCObject_FromVoidPtr’ was not declared in this scope
PyObject *pointer = PyCObject_FromVoidPtr((void ) swig_module, SWIG_Python_DestroyModule);
^
Box2D/Box2D_wrap.cpp: In function ‘swig_type_info SWIG_Python_TypeQuery(const char*)’:
Box2D/Box2D_wrap.cpp:2545:60: error: ‘PyCObject_AsVoidPtr’ was not declared in this scope
descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
^
Box2D/Box2D_wrap.cpp:2550:51: error: ‘PyCObject_FromVoidPtr’ was not declared in this scope
obj = PyCObject_FromVoidPtr(descriptor, NULL);
^
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for Box2D-kengz
Running setup.py clean for Box2D-kengz
Successfully built gym
Failed to build Box2D-kengz
Installing collected packages: Box2D-kengz, glfw, imageio, pycparser, cffi, Cython, mujoco-py, gym
Running setup.py install for Box2D-kengz ... error
Complete output from command /root/anaconda3/envs/gymlab/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-5jh8n6q7/Box2D-kengz/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-cwa7ey1x/install-record.txt --single-version-externally-managed --compile:
Using setuptools (version 39.1.0).
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/Box2D
copying library/Box2D/Box2D.py -> build/lib.linux-x86_64-3.6/Box2D
copying library/Box2D/__init__.py -> build/lib.linux-x86_64-3.6/Box2D
creating build/lib.linux-x86_64-3.6/Box2D/b2
copying library/Box2D/b2/__init__.py -> build/lib.linux-x86_64-3.6/Box2D/b2
running build_ext
building 'Box2D._Box2D' extension
swigging Box2D/Box2D.i to Box2D/Box2D_wrap.cpp
swig -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library/Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D/Box2D_wrap.cpp Box2D/Box2D.i
Box2D/Common/b2Math.h:66: Warning(302): Identifier 'b2Vec2' redefined by %extend (ignored),
Box2D/Box2D_math.i:47: Warning(302): %extend definition of 'b2Vec2'.
Box2D/Common/b2Math.h:157: Warning(302): Identifier 'b2Vec3' redefined by %extend (ignored),
Box2D/Box2D_math.i:168: Warning(302): %extend definition of 'b2Vec3'.
Box2D/Common/b2Math.h:196: Warning(302): Identifier 'b2Mat22' redefined by %extend (ignored),
Box2D/Box2D_math.i:301: Warning(302): %extend definition of 'b2Mat22'.
Box2D/Common/b2Math.h:270: Warning(302): Identifier 'b2Mat33' redefined by %extend (ignored),
Box2D/Box2D_math.i:372: Warning(302): %extend definition of 'b2Mat33'.
Box2D/Collision/b2DynamicTree.h:43: Warning(312): Nested union not currently supported (ignored).
Box2D/Common/b2Settings.h:144: Warning(506): Can't wrap varargs with keyword arguments enabled
Box2D/Common/b2Math.h:90: Warning(509): Overloaded method b2Vec2::operator ()(int32) is shadowed by b2Vec2::operator ()(int32) const at Box2D/Common/b2Math.h:84.
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/Box2D
creating build/temp.linux-x86_64-3.6/Box2D/Dynamics
creating build/temp.linux-x86_64-3.6/Box2D/Dynamics/Contacts
creating build/temp.linux-x86_64-3.6/Box2D/Dynamics/Joints
creating build/temp.linux-x86_64-3.6/Box2D/Common
creating build/temp.linux-x86_64-3.6/Box2D/Collision
creating build/temp.linux-x86_64-3.6/Box2D/Collision/Shapes
gcc -pthread -B /root/anaconda3/envs/gymlab/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/gymlab/include/python3.6m -c Box2D/Box2D_wrap.cpp -o build/temp.linux-x86_64-3.6/Box2D/Box2D_wrap.o -I. -Wno-unused
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
Box2D/Box2D_wrap.cpp: In function ‘swig_module_info* SWIG_Python_GetModule()’:
Box2D/Box2D_wrap.cpp:2453:51: error: ‘PyCObject_Import’ was not declared in this scope
(char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
^
Box2D/Box2D_wrap.cpp: In function ‘void SWIG_Python_SetModule(swig_module_info*)’:
Box2D/Box2D_wrap.cpp:2522:92: error: ‘PyCObject_FromVoidPtr’ was not declared in this scope
PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
^
Box2D/Box2D_wrap.cpp: In function ‘swig_type_info* SWIG_Python_TypeQuery(const char*)’:
Box2D/Box2D_wrap.cpp:2545:60: error: ‘PyCObject_AsVoidPtr’ was not declared in this scope
descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
^
Box2D/Box2D_wrap.cpp:2550:51: error: ‘PyCObject_FromVoidPtr’ was not declared in this scope
obj = PyCObject_FromVoidPtr(descriptor, NULL);
^
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/root/anaconda3/envs/gymlab/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-5jh8n6q7/Box2D-kengz/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-cwa7ey1x/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-5jh8n6q7/Box2D-kengz/
((swig issues :))
Box2D/Box2D_wrap.cpp: In function ‘swig_module_info* SWIG_Python_GetModule()’:
Box2D/Box2D_wrap.cpp:2453:51: error: ‘PyCObject_Import’ was not declared in this scope
CentOS 6.9, a "build gym example". (Note: No Box2D, gym issues when using an other OS with swig3 installed by default.)
Build swig-3
cd swig-3.0.12/
./configure --with-php --without-go --prefix=/usr/
make
# make install
gym-0.10.5 :
git clone https://github.com/openai/gym.git
cd gym/
# scl enable rh-python36 bash
# pip3.6 install '.[all]'
.
.
Running setup.py install for Box2D-kengz ... done
Running setup.py install for glfw ... done
Running setup.py install for pycparser ... done
Running setup.py install for mujoco-py ... done
Running setup.py install for gym ... done
Successfully installed Box2D-kengz-2.3.3 Cython-0.28.2 cffi-1.11.5 glfw-1.6.0 gym-0.10.5 imageio-2.3.0 mujoco-py-1.50.1.56 pycparser-2.18
According to the above error message I downloaded the latest version of Box2D to install, but reported the following error:
[root#localhost Box2D-kengz-2.3.3]# python setup.py install
Using setuptools (version 39.1.0).
running install
running bdist_egg
running egg_info
writing library/Box2D_kengz.egg-info/PKG-INFO
writing dependency_links to library/Box2D_kengz.egg-info/dependency_links.txt
writing top-level names to library/Box2D_kengz.egg-info/top_level.txt
reading manifest file 'library/Box2D_kengz.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'INSTALL'
warning: no files found matching 'MANIFEST'
warning: no files found matching 'README'
warning: no files found matching 'distribute_setup.py'
warning: no files found matching '.py' under directory 'Box2D'
warning: no files found matching '.c' under directory 'Box2D'
writing manifest file 'library/Box2D_kengz.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying library/Box2D/Box2D.py -> build/lib.linux-x86_64-3.6/Box2D
copying library/Box2D/init.py -> build/lib.linux-x86_64-3.6/Box2D
running build_ext
building 'Box2D._Box2D' extension
swigging Box2D/Box2D.i to Box2D/Box2D_wrap.cpp
swig -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library/Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D/Box2D_wrap.cpp Box2D/Box2D.i
Box2D/Common/b2Math.h:66: Warning(302): Identifier 'b2Vec2' redefined by %extend (ignored),
Box2D/Box2D_math.i:47: Warning(302): %extend definition of 'b2Vec2'.
Box2D/Common/b2Math.h:157: Warning(302): Identifier 'b2Vec3' redefined by %extend (ignored),
Box2D/Box2D_math.i:168: Warning(302): %extend definition of 'b2Vec3'.
Box2D/Common/b2Math.h:196: Warning(302): Identifier 'b2Mat22' redefined by %extend (ignored),
Box2D/Box2D_math.i:301: Warning(302): %extend definition of 'b2Mat22'.
Box2D/Common/b2Math.h:270: Warning(302): Identifier 'b2Mat33' redefined by %extend (ignored),
Box2D/Box2D_math.i:372: Warning(302): %extend definition of 'b2Mat33'.
Box2D/Collision/b2DynamicTree.h:43: Warning(312): Nested union not currently supported (ignored).
Box2D/Common/b2Settings.h:144: Warning(506): Can't wrap varargs with keyword arguments enabled
Box2D/Common/b2Math.h:90: Warning(509): Overloaded method b2Vec2::operator ()(int32) is shadowed by b2Vec2::operator ()(int32) const at Box2D/Common/b2Math.h:84.
gcc -pthread -B /root/anaconda3/envs/gymlab/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/gymlab/include/python3.6m -c Box2D/Box2D_wrap.cpp -o build/temp.linux-x86_64-3.6/Box2D/Box2D_wrap.o -I. -Wno-unused
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
Box2D/Box2D_wrap.cpp: In function ‘swig_module_info* SWIG_Python_GetModule()’:
Box2D/Box2D_wrap.cpp:2453:51: error: ‘PyCObject_Import’ was not declared in this scope
(char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
^
Box2D/Box2D_wrap.cpp: In function ‘void SWIG_Python_SetModule(swig_module_info*)’:
Box2D/Box2D_wrap.cpp:2522:92: error: ‘PyCObject_FromVoidPtr’ was not declared in this scope
PyObject *pointer = PyCObject_FromVoidPtr((void ) swig_module, SWIG_Python_DestroyModule);
^
Box2D/Box2D_wrap.cpp: In function ‘swig_type_info SWIG_Python_TypeQuery(const char*)’:
Box2D/Box2D_wrap.cpp:2545:60: error: ‘PyCObject_AsVoidPtr’ was not declared in this scope
descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
^
Box2D/Box2D_wrap.cpp:2550:51: error: ‘PyCObject_FromVoidPtr’ was not declared in this scope
obj = PyCObject_FromVoidPtr(descriptor, NULL);
^
error: command 'gcc' failed with exit status 1

Installing octave package in ubuntu

anyone can help me with this error?
octave:4> pkg install signal-1.2.0.tar.gz
error: the following dependencies where unsatisfied:
signal needs optim >= 1.0.0
signal needs specfun >= 0.0.0
signal needs control >= 2.2.3
signal needs general >= 1.3.2
octave:4> pkg install optim-1.2.2.tar.gz
error: the following dependencies where unsatisfied:
optim needs miscellaneous >= 1.0.10
optim needs struct >= 1.0.10
octave:4> pkg install struct-1.0.10.tar.gz
make: /usr/bin/mkoctfile: Command not found
make: *** [fields2cell.oct] Error 127
'make' returned the following error: make: Entering directory `/tmp/oct-fDBs5k/struct-1.0.10/src'
/usr/bin/mkoctfile -s fields2cell.cc
make: Leaving directory `/tmp/oct-fDBs5k/struct-1.0.10/src'
error: called from `pkg>configure_make' in file /usr/share/octave/3.6.2/m/pkg/pkg.m near line 1391, column 9
error: called from:
error: /usr/share/octave/3.6.2/m/pkg/pkg.m at line 834, column 5
error: /usr/share/octave/3.6.2/m/pkg/pkg.m at line 383, column 9
I need to install signal package, but I have to download other to work from I have noticed but it gets stuck when installing struct package.
#edit
The same error when trying to install misc~ package.
octave:5> pkg install miscellaneous-1.2.0.tar.gz
error: the following dependencies where unsatisfied:
miscellaneous needs general >= 1.3.1
octave:5> pkg install general-1.3.2.tar.gz
make: /usr/bin/mkoctfile: Command not found
make: *** [__exit__.oct] Error 127
'make' returned the following error: make: Entering directory `/tmp/oct-CA6o4U/general/src'
/usr/bin/mkoctfile __exit__.cc
make: Leaving directory `/tmp/oct-CA6o4U/general/src'
error: called from `pkg>configure_make' in file /usr/share/octave/3.6.2/m/pkg/pkg.m near line 1391, column 9
error: called from:
error: /usr/share/octave/3.6.2/m/pkg/pkg.m at line 834, column 5
error: /usr/share/octave/3.6.2/m/pkg/pkg.m at line 383, column 9
#edit
additional info:
octave:6> which mkoctfile
`mkoctfile' is a function from the file /usr/share/octave/3.6.2/m/miscellaneous/mkoctfile.m
I have no idea what to do..
You need to install mkoctfile. Depending on your ubuntu version this will be in different packages. It used be in octave-pkg-dev but now is on liboctave-dev.
Ubuntu and Debian place this as separate package because it is only needed if you want to build the packages yourself. They expect you to use the Octave packages that they packaged (sudo apt-get install octave-signal). Their versions will be behind the actual version but the same happens with the Octave version they distribute. That's the price to pay for stability.

Resources