Issue installing picamera (ERROR: Command errored out with exit status 1:) - picamera

Im trying to install picamera (pip install picamera) and I get the following error:
ERROR: Command errored out with exit status 1:
Can someone please help?
Python 3.9.1
pip 20.3.3
Full error message:
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python#3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py'"'"'; __file__='"'"'/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/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 /private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-wheel-x36s0i1b
cwd: /private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/
Complete output (61 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/picamera
copying picamera/streams.py -> build/lib/picamera
copying picamera/color.py -> build/lib/picamera
copying picamera/__init__.py -> build/lib/picamera
copying picamera/encoders.py -> build/lib/picamera
copying picamera/renderers.py -> build/lib/picamera
copying picamera/display.py -> build/lib/picamera
copying picamera/camera.py -> build/lib/picamera
copying picamera/frames.py -> build/lib/picamera
copying picamera/exc.py -> build/lib/picamera
copying picamera/bcm_host.py -> build/lib/picamera
copying picamera/mmalobj.py -> build/lib/picamera
copying picamera/array.py -> build/lib/picamera
copying picamera/mmal.py -> build/lib/picamera
running egg_info
writing picamera.egg-info/PKG-INFO
writing dependency_links to picamera.egg-info/dependency_links.txt
writing requirements to picamera.egg-info/requires.txt
writing top-level names to picamera.egg-info/top_level.txt
reading manifest file 'picamera.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'debian'
no previously-included directories found matching 'docs'
writing manifest file 'picamera.egg-info/SOURCES.txt'
installing to build/bdist.macosx-10.15-x86_64/wheel
running install
Traceback (most recent call last):
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 101, in run
with io.open('/proc/cpuinfo', 'r') as cpuinfo:
FileNotFoundError: [Errno 2] No such file or directory: '/proc/cpuinfo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 145, in <module>
main()
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 119, in main
setup(
File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 335, in run
self.run_command('install')
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 113, in run
raise ValueError('Unable to open /proc/cpuinfo')
ValueError: Unable to open /proc/cpuinfo
----------------------------------------
ERROR: Failed building wheel for picamera
Running setup.py clean for picamera
Failed to build picamera
Installing collected packages: picamera
Running setup.py install for picamera ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python#3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py'"'"'; __file__='"'"'/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/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/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-record-qme1_imo/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/picamera
cwd: /private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/
Complete output (25 lines):
running install
Traceback (most recent call last):
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 101, in run
with io.open('/proc/cpuinfo', 'r') as cpuinfo:
FileNotFoundError: [Errno 2] No such file or directory: '/proc/cpuinfo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 145, in <module>
main()
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 119, in main
setup(
File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python#3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py", line 113, in run
raise ValueError('Unable to open /proc/cpuinfo')
ValueError: Unable to open /proc/cpuinfo
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/opt/python#3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/setup.py'"'"'; __file__='"'"'/private/var/folders/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-install-rhshjkgn/picamera_1bc7cc4f85134726b19ddbe1c70f3c0a/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/mk/d5qfrxc13nb6rq4d1v_ntzp40000gn/T/pip-record-qme1_imo/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/picamera Check the logs for full command output.

Related

in ubuntu, I try to ninja -C out/Release_arm system_webview_apk , error happened

in ubuntu, I try to ninja -C out/Release_arm system_webview_apk , error happened
ACTION //v8:generate_bytecode_builtins_list(//build/toolchain/android:android_clang_arm)
FAILED: gen/v8/builtins-generated/bytecodes-builtins-list.h
python3 ../../v8/tools/run.py ./clang_x86_v8_arm/bytecode_builtins_list_generator gen/v8/builtins-generated/bytecodes-builtins-list.h
Traceback (most recent call last):
File "/mnt/d/code/chromium/src/out/Release_arm/../../v8/tools/run.py", line 12, in
result = subprocess.call(sys.argv[1:])
File "/usr/lib/python3.9/subprocess.py", line 349, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.9/subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: './clang_x86_v8_arm/bytecode_builtins_list_generator'

Tensorflow in Raspberry Pi - memory error

I am trying to install tensorflow in raspberry pi 4 with the next command:
pip install tensorflow
The next error occurs:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting tensorflow
Downloading https://www.piwheels.org/simple/tensorflow/tensorflow-1.14.0-cp37-none-linux_armv7l.whl (79.6MB)
100% |████████████████████████████████| 79.6MB 8.8MB/s
Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 143, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 338, in run
resolver.resolve(requirement_set)
File "/usr/lib/python3/dist-packages/pip/_internal/resolve.py", line 102, in resolve
self._resolve_one(requirement_set, req)
File "/usr/lib/python3/dist-packages/pip/_internal/resolve.py", line 256, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/lib/python3/dist-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for
self.require_hashes
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 283, in prepare_linked_requirement
progress_bar=self.progress_bar
File "/usr/lib/python3/dist-packages/pip/_internal/download.py", line 836, in unpack_url
progress_bar=progress_bar
File "/usr/lib/python3/dist-packages/pip/_internal/download.py", line 677, in unpack_http_url
unpack_file(from_path, location, content_type, link)
File "/usr/lib/python3/dist-packages/pip/_internal/utils/misc.py", line 600, in unpack_file
flatten=not filename.endswith('.whl')
File "/usr/lib/python3/dist-packages/pip/_internal/utils/misc.py", line 489, in unzip_file
data = zip.read(name)
File "/usr/lib/python3.7/zipfile.py", line 1429, in read
return fp.read()
File "/usr/lib/python3.7/zipfile.py", line 885, in read
buf += self._read1(self.MAX_N)
File "/usr/lib/python3.7/zipfile.py", line 975, in _read1
data = self._decompressor.decompress(data, n)
MemoryError
I have tried to install it with the next command that I've seen in the internet fixes the error, but it didn't.
pip install --no-cache-dir tensorflow
Any clue on what could I do??
Thanks in advance.

MSYS2 pip install numpy failed

I am new to MSYS2, so I tried to install numpy using pip (mingw-w64-x86_64-python3-pip-9.0.1-3), but the the installation is failed. Here is the output:
(...)
C compiler: x86_64-pc-msys-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe
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/src/npysort -I/usr/include/python3.6m -c'
x86_64-pc-msys-gcc: _configtest.c
/usr/bin/bash: x86_64-pc-msys-gcc: command not found
/usr/bin/bash: x86_64-pc-msys-gcc: command not found
failure.
removing: _configtest.c _configtest.o
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-3d852664/numpy/setup.py", line 394, in <module>
setup_package()
File "/tmp/pip-build-3d852664/numpy/setup.py", line 386, in setup_package
setup(**metadata)
File "/tmp/pip-build-3d852664/numpy/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-build-3d852664/numpy/numpy/distutils/command/install.py", line 62, in run
r = self.setuptools_run()
File "/tmp/pip-build-3d852664/numpy/numpy/distutils/command/install.py", line 36, in setuptools_run
return distutils_install.run(self)
File "/usr/lib/python3.6/distutils/command/install.py", line 551, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 314, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-build-3d852664/numpy/numpy/distutils/command/build.py", line 47, in run
old_build.run(self)
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 314, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-build-3d852664/numpy/numpy/distutils/command/build_src.py", line 148, in run
self.build_sources()
File "/tmp/pip-build-3d852664/numpy/numpy/distutils/command/build_src.py", line 159, in build_sources
self.build_library_sources(*libname_info)
File "/tmp/pip-build-3d852664/numpy/numpy/distutils/command/build_src.py", line 294, in build_library_sources
sources = self.generate_sources(sources, (lib_name, build_info))
File "/tmp/pip-build-3d852664/numpy/numpy/distutils/command/build_src.py", line 377, in generate_sources
source = func(extension, build_dir)
File "numpy/core/setup.py", line 675, in get_mathlib_info
raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-3d852664/numpy/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-4nnf7xbj-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-3d852664/numpy/
I have already build tools installed: I used the tutorial on https://github.com/orlp/dev-on-windows/wiki/Installing-GCC--&-MSYS2 (I only 64-bit packages)
I looked for similar issues on the net but I found nothing relevant.
Any comment or suggestion is welcome
Thanks in advance
The proper gcc compiler has not been installed. For my installation, I used the msys2 shell (not mingw) and installed the msys/gcc package:
pacman -S msys/gcc
pacman -S mingw-w64-x86_64-python-scipy
pacman -S mingw-w64-i686-python-scipy

This Exception comes while install tensorflow 1.3.0

i am getting this error while installing tensorflow 1.3.0. in the terminal of mac
Installing collected packages: tensorflow-tensorboard, backports.weakref, tensorflow
Found existing installation: tensorflow-tensorboard 0.4.0rc3
Uninstalling tensorflow-tensorboard-0.4.0rc3:
Successfully uninstalled tensorflow-tensorboard-0.4.0rc3
Exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 97, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/backports/weakref.py'

xmlsec on el capitan

I'm trying to install xmlsec on El Capitan and i'm not able to do so.
I'm following instructions on this page:
https://github.com/concordusapps/python-xmlsec
when I do pip install xmlsec I get:
Downloading xmlsec-0.3.1.tar.gz
Complete output from command python setup.py egg_info:
no previously-included directories found matching 'doc/.build'
Installed /private/tmp/easy_install-kotwF5/pkgconfig-1.1.0/.eggs/nose-1.3.7-py2.7.egg
zip_safe flag not set; analyzing archive contents...
Installed /private/tmp/pip-build-my91LX/xmlsec/.eggs/pkgconfig-1.1.0-py2.7.egg
Searching for setuptools-cython
Reading https://pypi.python.org/simple/setuptools_cython/
Best match: setuptools-cython 0.2.1
Downloading https://pypi.python.org/packages/source/s/setuptools_cython/setuptools_cython-0.2.1.tar.gz#md5=c29fc5bf2894e69cbd98e3800cef4707
Processing setuptools_cython-0.2.1.tar.gz
Writing /tmp/easy_install-xnAHIU/setuptools_cython-0.2.1/setup.cfg
Running setuptools_cython-0.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-xnAHIU/setuptools_cython-0.2.1/egg-dist-tmp-zk1125
zip_safe flag not set; analyzing archive contents...
Copying setuptools_cython-0.2.1-py2.7.egg to /private/tmp/pip-build-my91LX/xmlsec/.eggs
Installed /private/tmp/pip-build-my91LX/xmlsec/.eggs/setuptools_cython-0.2.1-py2.7.egg
Searching for Cython
Reading https://pypi.python.org/simple/Cython/
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/private/tmp/pip-build-my91LX/xmlsec/setup.py", line 121, in <module>
make_extension('xmlsec.template'),
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 268, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 836, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1081, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1093, in obtain
return installer(requirement)
File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 626, in easy_install
not self.always_copy, self.local_index
File "/usr/local/lib/python2.7/site-packages/setuptools/package_index.py", line 590, in fetch_distribution
self.find_packages(requirement)
File "/usr/local/lib/python2.7/site-packages/setuptools/package_index.py", line 427, in find_packages
self.scan_url(self.index_url + requirement.unsafe_name+'/')
File "/usr/local/lib/python2.7/site-packages/setuptools/package_index.py", line 761, in scan_url
self.process_url(url, True)
File "/usr/local/lib/python2.7/site-packages/setuptools/package_index.py", line 304, in process_url
f = self.open_url(url, "Download error on %s: %%s -- Some packages may not be found!" % url)
File "/usr/local/lib/python2.7/site-packages/setuptools/package_index.py", line 700, in open_url
return open_with_auth(url, self.opener)
File "/usr/local/lib/python2.7/site-packages/setuptools/package_index.py", line 894, in _socket_timeout
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/setuptools/package_index.py", line 1007, in open_with_auth
fp = opener(request)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 469, in error
result = self._call_chain(*args)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 656, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 469, in error
result = self._call_chain(*args)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 656, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1240, in https_open
context=self._context)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1200, in do_open
r = h.getresponse(buffering=True)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1132, in getresponse
response.begin()
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 453, in begin
version, status, reason = self._read_status()
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 409, in _read_status
line = self.fp.readline(_MAXLINE + 1)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 480, in readline
data = self._sock.recv(self._rbufsize)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 734, in recv
return self.read(buflen)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 621, in read
v = self._sslobj.read(len or 1024)
ssl.SSLError: ('The read operation timed out',)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-my91LX/xmlsec
and when I download the source and do it manually I get:
Processing /Users/myuser/python-xmlsec
Requirement already satisfied (use --upgrade to upgrade): lxml>=3.0 in /usr/local/lib/python2.7/site-packages (from xmlsec==0.1.2)
Installing collected packages: xmlsec
Running setup.py install for xmlsec
Complete output from command /usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-ad8Fqh-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-X7VjyO-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.11-x86_64-2.7
creating build/lib.macosx-10.11-x86_64-2.7/xmlsec
copying src/xmlsec/__init__.py -> build/lib.macosx-10.11-x86_64-2.7/xmlsec
copying src/xmlsec/meta.py -> build/lib.macosx-10.11-x86_64-2.7/xmlsec
running build_ext
cythoning src/xmlsec/constants.pyx to src/xmlsec/constants.c
building 'xmlsec.constants' extension
creating build/temp.macosx-10.11-x86_64-2.7
creating build/temp.macosx-10.11-x86_64-2.7/src
creating build/temp.macosx-10.11-x86_64-2.7/src/xmlsec
clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/lib/python2.7/site-packages/lxml -I/usr/local/lib/python2.7/site-packages/lxml/includes -Isrc -I/usr/local/Cellar/libxml2/2.9.2/include/libxml2 -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/xmlsec/constants.c -o build/temp.macosx-10.11-x86_64-2.7/src/xmlsec/constants.o
In file included from src/xmlsec/constants.c:256:
src/xmlsec.h:1:10: fatal error: 'xmlsec/crypto.h' file not found
#include <xmlsec/crypto.h>
^
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-ad8Fqh-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-X7VjyO-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-ad8Fqh-build
Is there something i'm missing?
This finally worked:
brew install -v libxmlsec1
Obviously this is using homebrew on macOS.
Installing (or reinstalling) limbxmlsec1 didn't work for me on OSX 10.14. Here's what I had to do:
There are some SDK headers that come with xcode. Copy them to the desktop:
cp /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg ~/Desktop
Install the package by double-clicking it, or by running this command:
sudo installer -pkg ~/Desktop/macOS_SDK_headers_for_macOS_10.14.pkg -target /
Try installing again:
pip install xmlsec