Cannot install PyQT5, neither on Linux nor macOS - pyqt5

As part of a class, we have to use PyQT5. However, installing in both Ubuntu 20.24 or macOS 12.1 gives the following errors. Please note that everything is up to date, and I have done everything I knew how to do. The answers to similar questions do not seem to yield any results.
macOS 12.1 (Python 3.10.2 / pip 22.0.3) :
Collecting pyqt5
Using cached PyQt5-5.15.6.tar.gz (3.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [29 lines of output]
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 156, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 160, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/sipbuild/api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/sipbuild/abstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/sipbuild/project.py", line 594, in setup
self.apply_user_defaults(tool)
File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-install-652wocvg/pyqt5_8cb0d91c53bd4b9293156fad68e175f5/project.py", line 63, in apply_user_defaults
super().apply_user_defaults(tool)
File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/sipbuild/project.py", line 241, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "/private/var/folders/j_/0h809bz57qgdkgx3299vt3jh0000gn/T/pip-build-env-0hz777qt/overlay/lib/python3.10/site-packages/pyqtbuild/builder.py", line 67, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Ubuntu 20.24 (Python 3.10.2 / pip 20.0.3) :
Defaulting to user installation because normal site-packages is not writeable
Collecting pyqt5
Using cached PyQt5-5.15.6.tar.gz (3.2 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [134 lines of output]
Collecting sip<7,>=6.4
Using cached sip-6.5.1.tar.gz (1.2 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting PyQt-builder<2,>=1.9
Using cached PyQt_builder-1.12.2-py3-none-any.whl (5.6 MB)
Collecting setuptools
Using cached setuptools-60.9.3-py3-none-any.whl (1.1 MB)
Collecting packaging
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting toml
Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
Using cached pyparsing-3.0.7-py3-none-any.whl (98 kB)
Building wheels for collected packages: sip
Building wheel for sip (pyproject.toml): started
Building wheel for sip (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Building wheel for sip (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [102 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.10
creating build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/bindings.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/installable.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/distutils_builder.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/pyproject.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/abstract_builder.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/py_versions.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/builder.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/configurable.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/__init__.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/api.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/argument_parser.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/abstract_project.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/project.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/buildable.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/version.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/helpers.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/setuptools_builder.py -> build/lib.linux-aarch64-3.10/sipbuild
copying sipbuild/exceptions.py -> build/lib.linux-aarch64-3.10/sipbuild
creating build/lib.linux-aarch64-3.10/sipbuild/distinfo
copying sipbuild/distinfo/distinfo.py -> build/lib.linux-aarch64-3.10/sipbuild/distinfo
copying sipbuild/distinfo/__init__.py -> build/lib.linux-aarch64-3.10/sipbuild/distinfo
copying sipbuild/distinfo/main.py -> build/lib.linux-aarch64-3.10/sipbuild/distinfo
creating build/lib.linux-aarch64-3.10/sipbuild/tools
copying sipbuild/tools/sdist.py -> build/lib.linux-aarch64-3.10/sipbuild/tools
copying sipbuild/tools/build.py -> build/lib.linux-aarch64-3.10/sipbuild/tools
copying sipbuild/tools/wheel.py -> build/lib.linux-aarch64-3.10/sipbuild/tools
copying sipbuild/tools/__init__.py -> build/lib.linux-aarch64-3.10/sipbuild/tools
copying sipbuild/tools/install.py -> build/lib.linux-aarch64-3.10/sipbuild/tools
creating build/lib.linux-aarch64-3.10/sipbuild/module
copying sipbuild/module/__init__.py -> build/lib.linux-aarch64-3.10/sipbuild/module
copying sipbuild/module/main.py -> build/lib.linux-aarch64-3.10/sipbuild/module
copying sipbuild/module/abi_version.py -> build/lib.linux-aarch64-3.10/sipbuild/module
copying sipbuild/module/module.py -> build/lib.linux-aarch64-3.10/sipbuild/module
creating build/lib.linux-aarch64-3.10/sipbuild/module/source
creating build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/voidptr.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/sipint.h -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/sip.h.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/README.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/array.h -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/sip.rst.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/sip.pyi -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/LICENSE-GPL3 -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/LICENSE-GPL2 -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/MANIFEST.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/array.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/LICENSE -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/pyproject.toml -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/setup.cfg.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/bool.cpp -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/objmap.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/siplib.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/int_convertors.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/descriptors.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/setup.py.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
copying sipbuild/module/source/13/threads.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/13
creating build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/voidptr.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/sipint.h -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/sip.h.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/README.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/array.h -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/sip.rst.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/sip.pyi -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/LICENSE-GPL3 -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/LICENSE-GPL2 -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/MANIFEST.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/array.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/LICENSE -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/apiversions.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/pyproject.toml -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/qtlib.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/setup.cfg.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/bool.cpp -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/objmap.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/siplib.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/int_convertors.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/descriptors.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/setup.py.in -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
copying sipbuild/module/source/12/threads.c -> build/lib.linux-aarch64-3.10/sipbuild/module/source/12
running build_ext
building 'sipbuild.code_generator' extension
creating build/temp.linux-aarch64-3.10
creating build/temp.linux-aarch64-3.10/code_generator
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/export.c -o build/temp.linux-aarch64-3.10/code_generator/export.o
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/extracts.c -o build/temp.linux-aarch64-3.10/code_generator/extracts.o
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/gencode.c -o build/temp.linux-aarch64-3.10/code_generator/gencode.o
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/heap.c -o build/temp.linux-aarch64-3.10/code_generator/heap.o
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/lexer.c -o build/temp.linux-aarch64-3.10/code_generator/lexer.o
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/parser.c -o build/temp.linux-aarch64-3.10/code_generator/parser.o
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icode_generator -I/usr/include/python3.10 -I/usr/local/include/python3.10 -c code_generator/pybinding.c -o build/temp.linux-aarch64-3.10/code_generator/pybinding.o
code_generator/pybinding.c:30:10: fatal error: Python.h: No such file or directory
30 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for sip
Failed to build sip
ERROR: Could not build wheels for sip, which is required to install pyproject.toml-based projects
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Stack Overflow refuses to let me post this with so much code so I'll just add something on the end. The entire context is already present so there shouldn't be anything to add, but I am forced to.

Related

Unable to compile with Rcpp

I use R version 4.0.2 (2020-06-22) -- "Taking Off Again". My system is W10 enterprise 1909.
I assume I have correctly installed Rtools40, since:
install.packages("jsonlite", type = "source") terminates correctly
I used some code from devtools: has_rtools() and it returns TRUE.
install.packages("jsonlite", type = "source")
essai de l'URL 'https://cran.rstudio.com/src/contrib/jsonlite_1.6.1.tar.gz'
Content type 'application/x-gzip' length 1057910 bytes (1.0 MB)
downloaded 1.0 MB
* installing *source* package 'jsonlite' ...
** package 'jsonlite' correctement décompressé et sommes MD5 vérifiées
** using staged installation
** libs
*** arch - i386
C:/Users/toto26/DOCUME~1/R/R-40~1.2/etc/i386/Makeconf:244: warning: overriding recipe for target '.m.o'
C:/Users/toto26/DOCUME~1/R/R-40~1.2/etc/i386/Makeconf:237: warning: ignoring old recipe for target '.m.o'
"C:/rtools40//mingw32/bin/"gcc -I"C:/Users/toto26/DOCUME~1/R/R-40~1.2/include" -DNDEBUG -Iyajl/api -D__USE_MINGW_ANSI_STDIO -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c base64.c -o base64.o
[...]
"C:/rtools40//mingw32/bin/"ar rcs yajl/libstatyajl.a yajl/yajl.o yajl/yajl_alloc.o yajl/yajl_buf.o yajl/yajl_encode.o yajl/yajl_gen.o yajl/yajl_lex.o yajl/yajl_parser.o yajl/yajl_tree.o
C:/rtools40//mingw32/bin/gcc -shared -s -static-libgcc -o jsonlite.dll tmp.def base64.o collapse_array.o collapse_object.o collapse_pretty.o escape_chars.o integer64_to_na.o is_datelist.o is_recordlist.o is_scalarlist.o modp_numtoa.o null_to_na.o num_to_char.o parse.o prettify.o push_parser.o r-base64.o register.o row_collapse.o transpose_list.o validate.o -Lyajl -lstatyajl -LC:/Users/toto26/DOCUME~1/R/R-40~1.2/bin/i386 -lR
installing to C:/Users/toto26/Documents/R/R-4.0.2/library/00LOCK-jsonlite/00new/jsonlite/libs/i386
*** arch - x64
C:/Users/toto26/DOCUME~1/R/R-40~1.2/etc/x64/Makeconf:244: warning: overriding recipe for target '.m.o'
C:/Users/toto26/DOCUME~1/R/R-40~1.2/etc/x64/Makeconf:237: warning: ignoring old recipe for target '.m.o'
"C:/rtools40//mingw64/bin/"gcc -I"C:/Users/toto26/DOCUME~1/R/R-40~1.2/include" -DNDEBUG -Iyajl/api -D__USE_MINGW_ANSI_STDIO -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c base64.c -o base64.o
[...]
"C:/rtools40//mingw64/bin/"ar rcs yajl/libstatyajl.a yajl/yajl.o yajl/yajl_alloc.o yajl/yajl_buf.o yajl/yajl_encode.o yajl/yajl_gen.o yajl/yajl_lex.o yajl/yajl_parser.o yajl/yajl_tree.o
C:/rtools40//mingw64/bin/gcc -shared -s -static-libgcc -o jsonlite.dll tmp.def base64.o collapse_array.o collapse_object.o collapse_pretty.o escape_chars.o integer64_to_na.o is_datelist.o is_recordlist.o is_scalarlist.o modp_numtoa.o null_to_na.o num_to_char.o parse.o prettify.o push_parser.o r-base64.o register.o row_collapse.o transpose_list.o validate.o -Lyajl -lstatyajl -LC:/Users/toto26/DOCUME~1/R/R-40~1.2/bin/x64 -lR
installing to C:/Users/toto26/Documents/R/R-4.0.2/library/00LOCK-jsonlite/00new/jsonlite/libs/x64
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'jsonlite'
finding HTML links ... fini
base64 html
flatten html
fromJSON html
prettify html
rbind_pages html
read_json html
serializeJSON html
stream_in html
unbox html
validate html
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* DONE (jsonlite)
The downloaded source packages are in
‘C:\Users\toto26\AppData\Local\Temp\RtmpQrssTP\downloaded_packages’
One of my issue may come from the location of make:
Sys.which("make")
make
"C:\\WINDOWS\\SYSTEM32\\make.exe"
instead of the expected
Sys.which("make")
## "C:\\rtools40\\usr\\bin\\make.exe"
I have asked my IT department to remove the system32 version from my laptop.
Nevertheless, I am not sure it is the root cause of my issues:
install.packages("Rcpp", type = 'source')
essai de l'URL 'https://cran.rstudio.com/src/contrib/Rcpp_1.0.4.6.tar.gz'
Content type 'application/x-gzip' length 2751467 bytes (2.6 MB)
downloaded 2.6 MB
* installing *source* package 'Rcpp' ...
** package 'Rcpp' correctement décompressé et sommes MD5 vérifiées
** using staged installation
** libs
*** arch - i386
C:/Users/toto26/DOCUME~1/R/R-40~1.2/etc/i386/Makeconf:244: warning: overriding recipe for target '.m.o'
C:/Users/toto26/DOCUME~1/R/R-40~1.2/etc/i386/Makeconf:237: warning: ignoring old recipe for target '.m.o'
"C:/rtools40//mingw32/bin/"g++ -std=gnu++11 -I"C:/Users/toto26/DOCUME~1/R/R-40~1.2/include" -DNDEBUG -I../inst/include/ -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c api.cpp -o api.o
"C:/rtools40//mingw32/bin/"g++ -std=gnu++11 -I"C:/Users/toto26/DOCUME~1/R/R-40~1.2/include" -DNDEBUG -I../inst/include/ -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c attributes.cpp -o attributes.o
"C:/rtools40//mingw32/bin/"g++ -std=gnu++11 -I"C:/Users/toto26/DOCUME~1/R/R-40~1.2/include" -DNDEBUG -I../inst/include/ -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c barrier.cpp -o barrier.o
"C:/rtools40//mingw32/bin/"g++ -std=gnu++11 -I"C:/Users/toto26/DOCUME~1/R/R-40~1.2/include" -DNDEBUG -I../inst/include/ -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c date.cpp -o date.o
"C:/rtools40//mingw32/bin/"g++ -std=gnu++11 -I"C:/Users/toto26/DOCUME~1/R/R-40~1.2/include" -DNDEBUG -I../inst/include/ -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c module.cpp -o module.o
"C:/rtools40//mingw32/bin/"g++ -std=gnu++11 -I"C:/Users/toto26/DOCUME~1/R/R-40~1.2/include" -DNDEBUG -I../inst/include/ -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c rcpp_init.cpp -o rcpp_init.o
"C:/rtools40//mingw32/bin/"g++ -std=gnu++11 -shared -s -static-libgcc -o Rcpp.dll tmp.def api.o attributes.o barrier.o date.o module.o rcpp_init.o -LC:/Users/toto26/DOCUME~1/R/R-40~1.2/bin/i386 -lR
/usr/bin/sh: line 8: "C:/rtools40//mingw32/bin/"g++ -std=gnu++11 : No such file or directory
aucune DLL n'a pas été créé
ERROR: compilation failed for package 'Rcpp'
* removing 'C:/Users/toto26/Documents/R/R-4.0.2/library/Rcpp'
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status
If I install the compiled version it works, but then I can't use Rcpp:
install.packages("Rcpp")
essai de l'URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/Rcpp_1.0.4.6.zip'
Content type 'application/zip' length 3167452 bytes (3.0 MB)
downloaded 3.0 MB
package ‘Rcpp’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\toto26\AppData\Local\Temp\RtmpQrssTP\downloaded_packages
> Rcpp::evalCpp("2+2")
C:/Users/toto26/DOCUME~1/R/R-40~1.2/etc/x64/Makeconf:244: warning: overriding recipe for target '.m.o'
C:/Users/toto26/DOCUME~1/R/R-40~1.2/etc/x64/Makeconf:237: warning: ignoring old recipe for target '.m.o'
"C:/rtools40//mingw64/bin/"g++ -std=gnu++11 -I"C:/Users/toto26/DOCUME~1/R/R-40~1.2/include" -DNDEBUG -I"C:/Users/toto26/Documents/R/R-4.0.2/library/Rcpp/include" -I"C:/Users/toto26/AppData/Local/Temp/RtmpQrssTP/sourceCpp-x86_64-w64-mingw32-1.0.4.6" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c file477046ea4828.cpp -o file477046ea4828.o
"C:/rtools40//mingw64/bin/"g++ -std=gnu++11 -shared -s -static-libgcc -o sourceCpp_2.dll tmp.def file477046ea4828.o -LC:/Users/toto26/DOCUME~1/R/R-40~1.2/bin/x64 -lR
/usr/bin/sh: line 8: "C:/rtools40//mingw64/bin/"g++ -std=gnu++11 : No such file or directory
Error in sourceCpp(code = code, env = env, rebuild = rebuild, cacheDir = cacheDir, :
Error occurred building shared library.
Any hints would be more than welcome.
Thanks a lot in advance.
Emmanuel
edit: here is my path:
> Sys.getenv('PATH')
[1] "C:\\rtools40\\usr\\bin;C:\\Users\\toto26\\Documents\\R\\R-4.0.2\\bin\\x64;C:\\rtools40\\usr\\bin;C:\\rtools40\\mingw64\\bin;C:\\ProgramData\\DockerDesktop\\version-bin;C:\\Program Files\\Docker\\Docker\\Resources\\bin;C:\\RBuildTools\\bin;C:\\RBuildTools\\mingw_64\\bin;C:\\RBuildTools\\mingw_32\\bin;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\MATLAB\\R2018a\\runtime\\win64;C:\\Program Files\\MATLAB\\R2018a\\bin;C:\\Program Files (x86)\\PDFtk\\bin\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\rtools40\\usr\\bin;C:\\RBuildTools\\3.5\\mingw_64\\bin;C:\\RBuildTools\\3.5\\bin;C:\\Python\\Scripts\\;C:\\Python\\;C:\\Users\\toto26\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\toto26\\AppData\\Local\\atom\\bin;C:\\Users\\toto26\\AppData\\Local\\Programs\\MiKTeX 2.9\\miktex\\bin\\x64\\;C:\\RBuildTools\\3.3\\mingw_64\\bin;C:\\MinGW\\bin;C:\\Users\\toto26\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\toto26\\AppData\\Local\\Pandoc\\;"

cannot install web3 in python virtual_enviroment

I am using $pip install web3 inside a python_virtual_env, but I get the error below.
Defaulting to user installation because normal site-packages is not writeable
Collecting web3
Using cached web3-5.7.0-py3-none-any.whl (460 kB)
Collecting hexbytes<1.0.0,>=0.1.0
Using cached hexbytes-0.2.0-py3-none-any.whl (5.3 kB)
Collecting jsonschema<4.0.0,>=3.0.0
Using cached jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Collecting typing-extensions<4,>=3.7.4.1; python_version < "3.8"
Using cached typing_extensions-3.7.4.2-py3-none-any.whl (22 kB)
Collecting protobuf<4,>=3.10.0
Using cached protobuf-3.11.3-cp36-cp36m-manylinux1_x86_64.whl (1.3 MB)
Requirement already satisfied: websockets<9.0.0,>=8.1.0 in /home/ajay/.local/lib/python3.6/site-packages (from web3) (8.1)
Collecting ipfshttpclient<1,>=0.4.12
Using cached ipfshttpclient-0.4.12-py2.py3-none-any.whl (157 kB)
Requirement already satisfied: requests<3.0.0,>=2.16.0 in /usr/lib/python3/dist-packages (from web3) (2.18.4)
Collecting eth-abi<3.0.0,>=2.0.0b6
Using cached eth_abi-2.1.1-py3-none-any.whl (27 kB)
Requirement already satisfied: eth-hash[pycryptodome]<1.0.0,>=0.2.0 in /home/ajay/.local/lib/python3.6/site-packages (from web3) (0.2.0)
Collecting lru-dict<2.0.0,>=1.1.6
Using cached lru-dict-1.1.6.tar.gz (9.4 kB)
Collecting eth-account<0.5.0,>=0.4.0
Using cached eth_account-0.4.0-py3-none-any.whl (26 kB)
Requirement already satisfied: eth-typing<3.0.0,>=2.0.0 in /home/ajay/.local/lib/python3.6/site-packages (from web3) (2.2.1)
Collecting eth-utils<2.0.0,>=1.8.4
Using cached eth_utils-1.8.4-py3-none-any.whl (23 kB)
Collecting attrs>=17.4.0
Using cached attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Collecting importlib-metadata; python_version < "3.8"
Using cached importlib_metadata-1.6.0-py2.py3-none-any.whl (30 kB)
Requirement already satisfied: setuptools in /home/ajay/.local/lib/python3.6/site-packages (from jsonschema<4.0.0,>=3.0.0->web3) (46.1.3)
Requirement already satisfied: six>=1.11.0 in /usr/lib/python3/dist-packages (from jsonschema<4.0.0,>=3.0.0->web3) (1.11.0)
Processing /home/ajay/.cache/pip/wheels/d1/8a/1c/32ab9017418a2c64e4fbaf503c08648bed2f8eb311b869a464/pyrsistent-0.16.0-cp36-cp36m-linux_x86_64.whl
Collecting multiaddr>=0.0.7
Using cached multiaddr-0.0.9-py2.py3-none-any.whl (16 kB)
Processing /home/ajay/.cache/pip/wheels/43/95/c9/c9f7a3f9dc34ebd851739148bd5b42ab35618ea0808388647c/parsimonious-0.8.1-py3-none-any.whl
Requirement already satisfied: pycryptodome<4,>=3.6.6; extra == "pycryptodome" in /home/ajay/.local/lib/python3.6/site-packages (from eth-hash[pycryptodome]<1.0.0,>=0.2.0->web3) (3.9.7)
Collecting eth-rlp<1,>=0.1.2
Using cached eth_rlp-0.1.2-py3-none-any.whl (6.5 kB)
Collecting rlp<2,>=1.0.0
Using cached rlp-1.2.0-py2.py3-none-any.whl (19 kB)
Collecting attrdict<3,>=2.0.0
Using cached attrdict-2.0.1-py2.py3-none-any.whl (9.9 kB)
Collecting eth-keys<0.3.0,>=0.2.1
Using cached eth_keys-0.2.4-py3-none-any.whl (24 kB)
Collecting eth-keyfile<0.6.0,>=0.5.0
Using cached eth_keyfile-0.5.1-py3-none-any.whl (8.3 kB)
Collecting cytoolz<1.0.0,>=0.10.1; implementation_name == "cpython"
Using cached cytoolz-0.10.1.tar.gz (475 kB)
Collecting zipp>=0.5
Using cached zipp-3.1.0-py3-none-any.whl (4.9 kB)
Processing /home/ajay/.cache/pip/wheels/35/f3/7e/e67e5ecf7e79b875e840bee3258c29ade8bffd56542d9c9c39/varint-1.0.2-py3-none-any.whl
Collecting base58
Using cached base58-2.0.0-py3-none-any.whl (6.0 kB)
Collecting netaddr
Using cached netaddr-0.7.19-py2.py3-none-any.whl (1.6 MB)
Requirement already satisfied: toolz>=0.8.0 in /home/ajay/.local/lib/python3.6/site-packages (from cytoolz<1.0.0,>=0.10.1; implementation_name == "cpython"->eth-utils<2.0.0,>=1.8.4->web3) (0.10.0)
Building wheels for collected packages: lru-dict, cytoolz
Building wheel for lru-dict (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-j__tim18/lru-dict/setup.py'"'"'; __file__='"'"'/tmp/pip-install-j__tim18/lru-dict/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-023_93_d
cwd: /tmp/pip-install-j__tim18/lru-dict/
Complete output (12 lines):
running bdist_wheel
running build
running build_ext
building 'lru' extension
creating build
creating build/temp.linux-x86_64-3.6
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c lru.c -o build/temp.linux-x86_64-3.6/lru.o
lru.c:1:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for lru-dict
Running setup.py clean for lru-dict
Building wheel for cytoolz (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-j__tim18/cytoolz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-j__tim18/cytoolz/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-o4caiffl
cwd: /tmp/pip-install-j__tim18/cytoolz/
Complete output (57 lines):
ALERT: Cython not installed. Building without Cython.
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/cytoolz
copying cytoolz/compatibility.py -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/_signatures.py -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/_version.py -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/__init__.py -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/utils_test.py -> build/lib.linux-x86_64-3.6/cytoolz
creating build/lib.linux-x86_64-3.6/cytoolz/curried
copying cytoolz/curried/operator.py -> build/lib.linux-x86_64-3.6/cytoolz/curried
copying cytoolz/curried/exceptions.py -> build/lib.linux-x86_64-3.6/cytoolz/curried
copying cytoolz/curried/__init__.py -> build/lib.linux-x86_64-3.6/cytoolz/curried
copying cytoolz/recipes.pyx -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/utils.pyx -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/itertoolz.pyx -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/dicttoolz.pyx -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/functoolz.pyx -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/__init__.pxd -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/dicttoolz.pxd -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/itertoolz.pxd -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/recipes.pxd -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/utils.pxd -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/cpython.pxd -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/functoolz.pxd -> build/lib.linux-x86_64-3.6/cytoolz
creating build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_tlz.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_doctests.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_curried.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_signatures.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/dev_skip_test.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_curried_toolzlike.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_functoolz.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_recipes.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_inspect_args.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_dicttoolz.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_dev_skip_test.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_embedded_sigs.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_compatibility.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_utils.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_none_safe.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_serialization.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_itertoolz.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_docstrings.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
running build_ext
building 'cytoolz.dicttoolz' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/cytoolz
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c cytoolz/dicttoolz.c -o build/temp.linux-x86_64-3.6/cytoolz/dicttoolz.o
cytoolz/dicttoolz.c:17:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cytoolz
Running setup.py clean for cytoolz
Failed to build lru-dict cytoolz
Installing collected packages: cytoolz, eth-utils, hexbytes, attrs, zipp, importlib-metadata, pyrsistent, jsonschema, typing-extensions, protobuf, varint, base58, netaddr, multiaddr, ipfshttpclient, parsimonious, eth-abi, lru-dict, rlp, eth-rlp, attrdict, eth-keys, eth-keyfile, eth-account, web3
Running setup.py install for cytoolz ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-j__tim18/cytoolz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-j__tim18/cytoolz/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-1xzorhvi/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/ajay/.local/include/python3.6m/cytoolz
cwd: /tmp/pip-install-j__tim18/cytoolz/
Complete output (57 lines):
ALERT: Cython not installed. Building without Cython.
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/cytoolz
copying cytoolz/compatibility.py -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/_signatures.py -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/_version.py -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/__init__.py -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/utils_test.py -> build/lib.linux-x86_64-3.6/cytoolz
creating build/lib.linux-x86_64-3.6/cytoolz/curried
copying cytoolz/curried/operator.py -> build/lib.linux-x86_64-3.6/cytoolz/curried
copying cytoolz/curried/exceptions.py -> build/lib.linux-x86_64-3.6/cytoolz/curried
copying cytoolz/curried/__init__.py -> build/lib.linux-x86_64-3.6/cytoolz/curried
copying cytoolz/recipes.pyx -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/utils.pyx -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/itertoolz.pyx -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/dicttoolz.pyx -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/functoolz.pyx -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/__init__.pxd -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/dicttoolz.pxd -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/itertoolz.pxd -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/recipes.pxd -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/utils.pxd -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/cpython.pxd -> build/lib.linux-x86_64-3.6/cytoolz
copying cytoolz/functoolz.pxd -> build/lib.linux-x86_64-3.6/cytoolz
creating build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_tlz.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_doctests.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_curried.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_signatures.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/dev_skip_test.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_curried_toolzlike.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_functoolz.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_recipes.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_inspect_args.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_dicttoolz.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_dev_skip_test.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_embedded_sigs.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_compatibility.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_utils.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_none_safe.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_serialization.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_itertoolz.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
copying cytoolz/tests/test_docstrings.py -> build/lib.linux-x86_64-3.6/cytoolz/tests
running build_ext
building 'cytoolz.dicttoolz' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/cytoolz
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c cytoolz/dicttoolz.c -o build/temp.linux-x86_64-3.6/cytoolz/dicttoolz.o
cytoolz/dicttoolz.c:17:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-j__tim18/cytoolz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-j__tim18/cytoolz/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-1xzorhvi/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/ajay/.local/include/python3.6m/cytoolz Check the logs for full command output.
Why is that and how can I fix it?
Just rerun after:
sudo apt-get install python3-dev
fatal error: Python.h: No such file or directory

Getting Python.h: No such file or directory when compiling mod_wsgi on OSX with python3

I have updated the python code from Python2 to Python3. I had no issues compiling mod_wsgi with python2. But When I compile it with Python3, it's giving below error.
I tried to get rid of the mod_wsgi installed at OS level and tried pointing the ./configure script to different Python3 locations. But, nothing worked.
./configure -with-python=/usr/bin/python3
make
[user#xx-xx-xx-xx mod_wsgi-4.6.4]$ make
/usr/bin/apxs -c -I/usr/include/python3.7m -DNDEBUG -D_GNU_SOURCE -Wc,-g -Wc,-O2 src/server/mod_wsgi.c src/server/wsgi_*.c -L/usr/lib64 -L/usr/lib64/python3.7/config-3.7m -lpython3.7m -lcrypt -lpthread -ldl -lutil -lm
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -g -O2 -I/usr/include/python3.7m -DNDEBUG -D_GNU_SOURCE -c -o src/server/mod_wsgi.lo src/server/mod_wsgi.c && touch src/server/mod_wsgi.slo
In file included from src/server/mod_wsgi.c:22:0:
src/server/wsgi_python.h:24:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
apxs:Error: Command failed with rc=65536
The solution to this problem depends on your Linux distribution. You'll have to install the dev package for your Python version.
sudo apt-get install python3-dev
sudo yum install python3-devel
A more complete explanation on the missing Python header file can be found here

unable to `pip install numpy` on a specific machine

pip install numpy in a python virtualenv on my own Mac OSX machine and on another of my machine running Arch Linux works perfectly.
Unfortunately, the same command fails to work on a colleague's machine running Gentoo.
Here's the pip.log showing the error logs:-
building data_files sources
build_src: building npy-pkg config files
running build_py
copying numpy/version.py -> build/lib.linux-x86_64-2.7/numpy
copying build/src.linux-x86_64-2.7/numpy/__config__.py -> build/lib.linux-x86_64-2.7/numpy
copying build/src.linux-x86_64-2.7/numpy/distutils/__config__.py -> build/lib.linux-x86_64-2.7/numpy/distutils
running build_clib
customize UnixCCompiler
customize UnixCCompiler using build_clib
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize GnuFCompiler
customize IntelFCompiler
customize LaheyFCompiler
customize PGroupFCompiler
customize AbsoftFCompiler
customize NAGFCompiler
customize VastFCompiler
customize CompaqFCompiler
customize IntelItaniumFCompiler
customize IntelEM64TFCompiler
customize Gnu95FCompiler
customize Gnu95FCompiler
customize Gnu95FCompiler using build_ext
building 'numpy.linalg.lapack_lite' extension
compiling C sources
C compiler: x86_64-pc-linux-gnu-gcc -pthread -O3 -march=native -pipe -fomit-frame-pointer -fno-ident -fPIC
compile options: '-DNO_ATLAS_INFO=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/usr/include/python2.7 -Ibuild/src.linux-x86_64-2.7/numpy/core/src/multiarray -Ibuild/src.linux-x86_64-2.7/numpy/core/src/umath -c'
x86_64-pc-linux-gnu-gcc: numpy/linalg/lapack_litemodule.c
x86_64-pc-linux-gnu-gcc: numpy/linalg/python_xerbla.c
/usr/bin/gfortran -Wall -s build/temp.linux-x86_64-2.7/numpy/linalg/lapack_litemodule.o build/temp.linux-x86_64-2.7/numpy/linalg/python_xerbla.o -L/usr/lib64 -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.7 -llapack -lblas -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/numpy/linalg/lapack_lite.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
error: Command "/usr/bin/gfortran -Wall -s build/temp.linux-x86_64-2.7/numpy/linalg/lapack_litemodule.o build/temp.linux-x86_64-2.7/numpy/linalg/python_xerbla.o -L/usr/lib64 -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.7 -llapack -lblas -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/numpy/linalg/lapack_lite.so" failed with exit status 1
----------------------------------------
Command /home/stefan/.virtualenvs/senatus_env/bin/python2.7 -c "import setuptools;__file__='/home/stefan/.virtualenvs/senatus_env/build/numpy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-Ebkksh-record/install-record.txt --install-headers /home/stefan/.virtualenvs/senatus_env/include/site/python2.7 failed with error code 1 in /home/stefan/.virtualenvs/senatus_env/build/numpy
Exception information:
Traceback (most recent call last):
File "/home/stefan/.virtualenvs/senatus_env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main
status = self.run(options, args)
File "/home/stefan/.virtualenvs/senatus_env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/commands/install.py", line 250, in run
requirement_set.install(install_options, global_options)
File "/home/stefan/.virtualenvs/senatus_env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 1133, in install
requirement.install(install_options, global_options)
File "/home/stefan/.virtualenvs/senatus_env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 577, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "/home/stefan/.virtualenvs/senatus_env/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/__init__.py", line 256, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command /home/stefan/.virtualenvs/senatus_env/bin/python2.7 -c "import setuptools;__file__='/home/stefan/.virtualenvs/senatus_env/build/numpy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-Ebkksh-record/install-record.txt --install-headers /home/stefan/.virtualenvs/senatus_env/include/site/python2.7 failed with error code 1 in /home/stefan/.virtualenvs/senatus_env/build/numpy
It appears that the gfortran on my colleague's machine does not play well with the numpy package he is trying to install in the virtualenv. Any idea why this might be so?
If CFLAGS, CXXFLAGS, or LDFLAGS are set, it could cause this. The problem is that those environment variables override the settings in the compile script, causing problems.
Just unset them for the invocation of the pip command and you should be all set.
It looks to me that setuptools is not working correctly, setuptools has been superceded by the python "dist" utility so you might want to install that and retry the installation.

How do I install numpy on a linux cluster? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I am a user (who is also rather new to this stuff) on a shared linux (RHEL 4) cluster and I am trying to install numpy. The cluster actually does come with it installed, but it uses Python version 2.3 and pretty much all of my scripts only work with Python 2.7. So I downloaded numpy-1.6.1, un-tar'ed it, and ran the setup and got the following (see below). I've also tried the "install" rather the build argument but this doesn't work either. I've been trying for hours to get this to work so I'd really appreciate the help. Any thoughts?
$ Python-2.7.2/python setup.py build --fcompiler=gfortran
Running from numpy source directory.non-existing path in
'numpy/distutils': 'site.cfg' F2PY Version 2 blas_opt_info:
blas_mkl_info: libraries mkl,vml,guide not found in /usr/local/lib64
libraries mkl,vml,guide not found in /usr/local/lib libraries
mkl,vml,guide not found in /usr/lib64 libraries mkl,vml,guide not
found in /usr/lib NOT AVAILABLE
atlas_blas_threads_info: Setting PTATLAS=ATLAS libraries
ptf77blas,ptcblas,atlas not found in /usr/local/lib64 libraries
ptf77blas,ptcblas,atlas not found in /usr/local/lib libraries
ptf77blas,ptcblas,atlas not found in /usr/lib64 libraries
ptf77blas,ptcblas,atlas not found in /usr/lib/sse2 libraries
ptf77blas,ptcblas,atlas not found in /usr/lib NOT AVAILABLE
atlas_blas_info: libraries f77blas,cblas,atlas not found in
/usr/local/lib64 libraries f77blas,cblas,atlas not found in
/usr/local/lib customize GnuFCompiler Found executable /usr/bin/g77
gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found
customize GnuFCompiler gnu: no Fortran 90 compiler found gnu: no
Fortran 90 compiler found customize GnuFCompiler using config
compiling '_configtest.c':
/* This file is generated from numpy/distutils/system_info.py */ void
ATL_buildinfo(void); int main(void) { ATL_buildinfo(); return 0; }
C compiler: /usr/bin/gcc4 -fno-strict-aliasing -g -O2 -DNDEBUG -g
-fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
compile options: '-c' gcc4: _configtest.c /usr/bin/gcc4 _configtest.o
-L/usr/lib64 -lf77blas -lcblas -latlas -o _configtest ATLAS version 3.7.11 built by root on Mon Jun 5 10:14:12 EDT 2006: UNAME : Linux intel1.lsf.platform.com 2.6.9-34.ELsmp #1 SMP Fri Feb 24
16:56:28 EST 2006 x86_64 x86_64 x86_64 GNU/Linux INSTFLG :
MMDEF :
/export/madison/src/roll/hpc/BUILD/ATLAS/CONFIG/ARCHS/P4E64SSE3/gcc/gemm
ARCHDEF :
/export/madison/src/roll/hpc/BUILD/ATLAS/CONFIG/ARCHS/P4E64SSE3/gcc/misc
F2CDEFS : -DAdd__ -DStringSunStyle CACHEEDGE: 393216 F77 :
/usr/bin/g77, version GNU Fortran (GCC) 3.4.5 20051201 (Red Hat
3.4.5-2) F77FLAGS : -fomit-frame-pointer -O -m64 CC : /usr/bin/gcc, version gcc (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2) CC
FLAGS : -fomit-frame-pointer -O3 -funroll-all-loops -m64 MCC :
/usr/bin/gcc, version gcc (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)
MCCFLAGS : -fomit-frame-pointer -O -m64 success! removing:
_configtest.c _configtest.o _configtest FOUND:
libraries = ['f77blas', 'cblas', 'atlas']
library_dirs = ['/usr/lib64']
language = c
define_macros = [('ATLAS_INFO', '"\"3.7.11\""')]
FOUND:
libraries = ['f77blas', 'cblas', 'atlas']
library_dirs = ['/usr/lib64']
language = c
define_macros = [('ATLAS_INFO', '"\"3.7.11\""')]
lapack_opt_info: lapack_mkl_info: mkl_info: libraries mkl,vml,guide
not found in /usr/local/lib64 libraries mkl,vml,guide not found in
/usr/local/lib libraries mkl,vml,guide not found in /usr/lib64
libraries mkl,vml,guide not found in /usr/lib NOT AVAILABLE
NOT AVAILABLE
atlas_threads_info: Setting PTATLAS=ATLAS libraries
ptf77blas,ptcblas,atlas not found in /usr/local/lib64 libraries
lapack_atlas not found in /usr/local/lib64 libraries
ptf77blas,ptcblas,atlas not found in /usr/local/lib libraries
lapack_atlas not found in /usr/local/lib libraries
ptf77blas,ptcblas,atlas not found in /usr/lib64 libraries
lapack_atlas not found in /usr/lib64 libraries
ptf77blas,ptcblas,atlas not found in /usr/lib/sse2 libraries
lapack_atlas not found in /usr/lib/sse2 libraries
ptf77blas,ptcblas,atlas not found in /usr/lib libraries lapack_atlas
not found in /usr/lib numpy.distutils.system_info.atlas_threads_info
NOT AVAILABLE
atlas_info: libraries f77blas,cblas,atlas not found in
/usr/local/lib64 libraries lapack_atlas not found in
/usr/local/lib64 libraries f77blas,cblas,atlas not found in
/usr/local/lib libraries lapack_atlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/lib64
numpy.distutils.system_info.atlas_info FOUND:
libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
library_dirs = ['/usr/lib64']
language = f77
define_macros = [('ATLAS_INFO', '"\"3.7.11\""')]
FOUND:
libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
library_dirs = ['/usr/lib64']
language = f77
define_macros = [('ATLAS_INFO', '"\"3.7.11\""')]
running build running config_cc unifing config_cc, config, build_clib,
build_ext, build commands --compiler options running config_fc unifing
config_fc, config, build_clib, build_ext, build commands --fcompiler
options running build_src build_src building py_modules sources
building library "npymath" sources customize Gnu95FCompiler Found
executable /usr/bin/gfortran customize Gnu95FCompiler using config C
compiler: /usr/bin/gcc4 -fno-strict-aliasing -g -O2 -DNDEBUG -g
-fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
compile options: '-Inumpy/core/src/private -Inumpy/core/src
-Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/scratch/groups/crabtree/Python-2.7.2/Include -I/scratch/groups/crabtree/Python-2.7.2 -c' gcc4: _configtest.c /usr/bin/gcc4 _configtest.o -o _configtest success! removing:
_configtest.c _configtest.o _configtest C compiler: /usr/bin/gcc4 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
compile options: '-Inumpy/core/src/private -Inumpy/core/src
-Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/scratch/groups/crabtree/Python-2.7.2/Include -I/scratch/groups/crabtree/Python-2.7.2 -c' gcc4: _configtest.c
_configtest.c:1: warning: conflicting types for built-in function 'exp' /usr/bin/gcc4 _configtest.o -o _configtest
_configtest.o(.text+0x5): In function main': /scratch/groups/crabtree/numpy-1.6.1/_configtest.c:6: undefined
reference toexp' collect2: ld returned 1 exit status
_configtest.o(.text+0x5): In function main': /scratch/groups/crabtree/numpy-1.6.1/_configtest.c:6: undefined
reference toexp' collect2: ld returned 1 exit status failure.
removing: _configtest.c _configtest.o C compiler: /usr/bin/gcc4
-fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
compile options: '-Inumpy/core/src/private -Inumpy/core/src
-Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/scratch/groups/crabtree/Python-2.7.2/Include -I/scratch/groups/crabtree/Python-2.7.2 -c' gcc4: _configtest.c
_configtest.c:1: warning: conflicting types for built-in function 'exp' /usr/bin/gcc4 _configtest.o -lm -o _configtest success!
removing: _configtest.c _configtest.o _configtest building extension
"numpy.core._sort" sources adding
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/config.h' to
sources. adding
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/_numpyconfig.h'
to sources. executing numpy/core/code_generators/generate_numpy_api.py
adding
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/__multiarray_api.h'
to sources. numpy.core - nothing done with h_files =
['build/src.linux-x86_64-2.7/numpy/core/include/numpy/config.h',
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/_numpyconfig.h',
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/__multiarray_api.h']
building extension "numpy.core.multiarray" sources adding
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/config.h' to
sources. adding
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/_numpyconfig.h'
to sources. executing numpy/core/code_generators/generate_numpy_api.py
adding
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/__multiarray_api.h'
to sources. numpy.core - nothing done with h_files =
['build/src.linux-x86_64-2.7/numpy/core/include/numpy/config.h',
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/_numpyconfig.h',
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/__multiarray_api.h']
building extension "numpy.core.umath" sources adding
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/config.h' to
sources. adding
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/_numpyconfig.h'
to sources. executing numpy/core/code_generators/generate_ufunc_api.py
adding
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/__ufunc_api.h' to
sources. adding 'build/src.linux-x86_64-2.7/numpy/core/src/umath' to
include_dirs. numpy.core - nothing done with h_files =
['build/src.linux-x86_64-2.7/numpy/core/src/umath/funcs.inc',
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/config.h',
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/_numpyconfig.h',
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/__ufunc_api.h']
building extension "numpy.core.scalarmath" sources adding
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/config.h' to
sources. adding
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/_numpyconfig.h'
to sources. executing numpy/core/code_generators/generate_numpy_api.py
adding
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/__multiarray_api.h'
to sources. executing numpy/core/code_generators/generate_ufunc_api.py
adding
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/__ufunc_api.h' to
sources. numpy.core - nothing done with h_files =
['build/src.linux-x86_64-2.7/numpy/core/include/numpy/config.h',
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/_numpyconfig.h',
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/__multiarray_api.h',
'build/src.linux-x86_64-2.7/numpy/core/include/numpy/__ufunc_api.h']
building extension "numpy.core._dotblas" sources adding
'numpy/core/blasdot/_dotblas.c' to sources. building extension
"numpy.core.umath_tests" sources building extension
"numpy.core.multiarray_tests" sources building extension
"numpy.lib._compiled_base" sources building extension
"numpy.numarray._capi" sources building extension
"numpy.fft.fftpack_lite" sources building extension
"numpy.linalg.lapack_lite" sources adding
'numpy/linalg/lapack_litemodule.c' to sources. adding
'numpy/linalg/python_xerbla.c' to sources. building extension
"numpy.random.mtrand" sources C compiler: /usr/bin/gcc4
-fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
compile options: '-Inumpy/core/src/private -Inumpy/core/src
-Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/scratch/groups/crabtree/Python-2.7.2/Include -I/scratch/groups/crabtree/Python-2.7.2 -c' gcc4: _configtest.c /usr/bin/gcc4 _configtest.o -o _configtest
_configtest failure. removing: _configtest.c _configtest.o _configtest building data_files sources build_src: building npy-pkg config files
running build_py copying numpy/version.py ->
build/lib.linux-x86_64-2.7/numpy copying numpy/config.py ->
build/lib.linux-x86_64-2.7/numpy copying
build/src.linux-x86_64-2.7/numpy/config.py ->
build/lib.linux-x86_64-2.7/numpy copying numpy/distutils/config.py
-> build/lib.linux-x86_64-2.7/numpy/distutils copying build/src.linux-x86_64-2.7/numpy/distutils/config.py ->
build/lib.linux-x86_64-2.7/numpy/distutils running build_clib
customize UnixCCompiler customize UnixCCompiler using build_clib
running build_ext customize UnixCCompiler customize UnixCCompiler
using build_ext customize Gnu95FCompiler customize Gnu95FCompiler
using build_ext building 'numpy.core._dotblas' extension compiling C
sources C compiler: /usr/bin/gcc4 -fno-strict-aliasing -g -O2 -DNDEBUG
-g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
compile options: '-DATLAS_INFO="\"3.7.11\"" -Inumpy/core/blasdot
-Inumpy/core/include -Ibuild/src.linux-x86_64-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/scratch/groups/crabtree/Python-2.7.2/Include -I/scratch/groups/crabtree/Python-2.7.2 -Ibuild/src.linux-x86_64-2.7/numpy/core/src/multiarray -Ibuild/src.linux-x86_64-2.7/numpy/core/src/umath -c' gcc4: numpy/core/blasdot/_dotblas.c numpy/core/blasdot/_dotblas.c: In
function 'dotblas_matrixproduct': numpy/core/blasdot/_dotblas.c:239:
warning: comparison of distinct pointer types lacks a cast
numpy/core/blasdot/_dotblas.c:257: warning: passing argument 3 of
'*(PyArray_API + 2240u)' from incompatible pointer type
numpy/core/blasdot/_dotblas.c:292: warning: passing argument 3 of
'*(PyArray_API + 2240u)' from incompatible pointer type gcc -pthread
-shared build/temp.linux-x86_64-2.7/numpy/core/blasdot/_dotblas.o -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.7 -lf77blas -lcblas -latlas -o build/lib.linux-x86_64-2.7/numpy/core/_dotblas.so /usr/bin/ld: /usr/lib64/libcblas.a(cblas_dgemm.o): relocation R_X86_64_32 against
a local symbol' can not be used when making a shared object;
recompile with -fPIC /usr/lib64/libcblas.a: could not read symbols:
Bad value collect2: ld returned 1 exit status /usr/bin/ld:
/usr/lib64/libcblas.a(cblas_dgemm.o): relocation R_X86_64_32 against
a local symbol' can not be used when making a shared object;
recompile with -fPIC /usr/lib64/libcblas.a: could not read symbols:
Bad value collect2: ld returned 1 exit status error: Command "gcc
-pthread -shared build/temp.linux-x86_64-2.7/numpy/core/blasdot/_dotblas.o -L/usr/lib64
-Lbuild/temp.linux-x86_64-2.7 -lf77blas -lcblas -latlas -o build/lib.linux-x86_64-2.7/numpy/core/_dotblas.so" failed with exit
status 1
I had LOTS of compatibilty problems between python 2.7 and the various versions of numpy, scipy, matplotlib ... that I had to install. Finally, the good option was to use (under ubuntu) the apt-get utility, to be sure to have the versions compatible between all them packages.
Now, when reading your log, I see that you do not have LAPACK installed. See the BLAS and/or ATLAS packages to have this first. You also need a fortran compiler to be installed previously. And also the python2.7-dev package which contains the needed headers and statics.
So, the procedure I would follow in your case is as follows :
What is the GCC version you have ?
louis#APS007:~$ gcc -v
Using built-in specs.
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
Check that you have a gcc version 4 at least (able to deal with 64 bit floats as numpy needs them) or update your O.S. Carefull ! Updating the GCC is NOT an innocent package tuning...
Install a Fortran compiler.
Eventually install the LAPACK library. It will seriously speed up the numpy by pre-compiling most of its routines and tuning them for your CPU.
Install python-dev
Then you may python setup build.
Hope this was helpfull !