i have the following problem, i tried to install luma.matrix on my Raspberry Pi2. But the setup is aborted with the following message:
Processing Pillow-4.1.0.tar.gz
Writing /tmp/easy_install-A_OEki/Pillow-4.1.0/setup.cfg
Running Pillow-4.1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-A_OEki/Pillow-4.1.0/egg-dist-tmp-SmW0g3
warning: no files found matching '*.sh'
no previously-included directories found matching 'docs/_static'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching '.travis'
warning: no previously-included files found matching '.travis/*'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'build_children.sh'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.7/multiprocessing/pool.py", line 329, in _handle_workers
debug('worker handler exiting')
TypeError: 'NoneType' object is not callable
Exception TypeError: TypeError("'NoneType' object does not support item deletion",) in <Finalize object, dead> ignored
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.7/multiprocessing/pool.py", line 353, in _handle_tasks
debug('task handler got sentinel')
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "setup.py", line 67, in <module>
"Operating System :: Unix"
File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/local/lib/python2.7/dist-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/usr/local/lib/python2.7/dist-packages/setuptools/command/install.py", line 117, in do_egg_install
cmd.run()
File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 411, in run
self.easy_install(spec, not self.no_deps)
File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 654, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 701, in install_item
self.process_distribution(spec, dist, deps)
File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 746, in process_distribution
[requirement], self.local_index, self.easy_install
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 851, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1123, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1135, in obtain
return installer(requirement)
File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 673, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 699, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 880, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1119, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1105, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 258, in run_setup
raise
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 198, in setup_context
yield
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 169, in save_modules
saved_exc.resume()
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 144, in resume
six.reraise(type, exc, self._tb)
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 157, in save_modules
yield saved
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 198, in setup_context
yield
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 255, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 285, in run
return func()
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 253, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-A_OEki/Pillow-4.1.0/setup.py", line 756, in <module>
setuptools.sandbox.UnpickleableException: RequiredDependencyException('\n\nThe headers or library files could not be found for zlib,\na required dependency when compiling Pillow from source.\n\nPlease see the install instructions at:\n https://pillow.readthedocs.io/en/latest/installation.html\n\n',)
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable
The same problem when i try pip intall pillow. Zlib is already installed... Thank you
Try the following steps.
Fix broken packages sudo apt-get -f install. Eventually clean and update the package list sudo apt-get clean && sudo apt-get update.
Pillow and PIL cannot co-exist in the same environment. Before installing Pillow, please uninstall PIL.
Uninstall PIL sudo apt-get remove python-pil.
We do not provide binaries for Linux. Most major Linux distributions, including Fedora, Debian/Ubuntu and ArchLinux include Pillow in packages that previously contained PIL e.g. python-imaging. Please consider using native operating system packages first to avoid installation problems and/or missing library support later.
Install Pillow (on Unix-like systems) : sudo apt-get install python-imaging
I believe apt will install the require dependencies if it does not these are the prerequisites you will need sudo apt-get install libjpeg62-dev zlib1g-dev libfreetype6-dev liblcms1-dev
More about Pillow's installation, here and here.
Related
I'm trying to install the package from: https://gitlab.idiap.ch/bob/bob.paper.ijcb2021_vision_transformer_pad.
I had to edit the spec-file.txt to update the missing links with the earliest version available from each package and also modified the buildout file to connect via http instead of ssh. I working with conda + mamba in Ubuntu 20.04 and bob.extension is installed, however I can't get past this point when running buildout. Any tips on how to fix this? Thank you.
Here is the prompt I get with buildout:
mr.developer: Queued 'bob.db.hqwmca' for checkout.
mr.developer: Queued 'bob.io.stream' for checkout.
mr.developer: Queued 'bob.ip.stereo' for checkout.
mr.developer: Skipped checkout of existing package 'bob.db.hqwmca'.
mr.developer: Skipped checkout of existing package 'bob.io.stream'.
mr.developer: Skipped checkout of existing package 'bob.ip.stereo'.
Develop: '/home/angela/Descargas/bob.paper.ijcb2021_vision_transformer_pad/src/bob.io.stream'
bob.buildout.tools: taking requirement `setuptools' (45.2.0) from `/usr/lib/python3/dist-packages'
bob.buildout.tools: taking requirement `numpy' (1.22.1) from `/home/angela/Descargas/bob.paper.ijcb2021_vision_transformer_pad/eggs/numpy-1.22.1-py3.8-linux-x86_64.egg'
bob.buildout.tools: taking requirement `scipy' (1.7.3) from `/home/angela/Descargas/bob.paper.ijcb2021_vision_transformer_pad/eggs/scipy-1.7.3-py3.8-linux-x86_64.egg'
bob.buildout.tools: Installing `bob.io.base' for package `/home/angela/Descargas/bob.paper.ijcb2021_vision_transformer_pad/src/bob.io.stream'...
Getting distribution for 'bob.io.base'.
WARNING: The easy_install command is deprecated and will be removed in a future version.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-taijyg5a/bob.io.base-4.0.0/setup.py", line 10, in <module>
ModuleNotFoundError: No module named 'bob.extension'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 2372, in main
setup(
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 450, in run
self.easy_install(spec, not self.no_deps)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 693, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 738, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 923, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1191, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1177, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 253, in run_setup
raise
File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/usr/lib/python3/dist-packages/setuptools/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-taijyg5a/bob.io.base-4.0.0/setup.py", line 10, in <module>
ModuleNotFoundError: No module named 'bob.extension'
An error occurred when trying to install /tmp/tmpo3qzby_8get_dist/bob.io.base-4.0.0.zip. Look above this message for any errors that were output by easy_install.
While:
Installing.
Processing develop directory '/home/angela/Descargas/bob.paper.ijcb2021_vision_transformer_pad/src/bob.io.stream'.
Getting distribution for 'bob.io.base'.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/zc/buildout/buildout.py", line 2174, in main
getattr(buildout, command)(args)
File "/usr/lib/python3/dist-packages/zc/buildout/buildout.py", line 679, in install
installed_develop_eggs = self._develop()
File "/usr/lib/python3/dist-packages/zc/buildout/buildout.py", line 922, in _develop
zc.buildout.easy_install.develop(setup, dest)
File "/home/angela/Descargas/bob.paper.ijcb2021_vision_transformer_pad/eggs/bob.buildout-2.3.0-py3.8.egg/bob/buildout/extension.py", line 170, in develop
tools.satisfy_requirements(self.buildout, directory, working_set)
File "/home/angela/Descargas/bob.paper.ijcb2021_vision_transformer_pad/eggs/bob.buildout-2.3.0-py3.8.egg/bob/buildout/tools.py", line 231, in satisfy_requirements
working_set = install_package(buildout, req, working_set)
File "/home/angela/Descargas/bob.paper.ijcb2021_vision_transformer_pad/eggs/bob.buildout-2.3.0-py3.8.egg/bob/buildout/tools.py", line 200, in install_package
new_ws = zc.buildout.easy_install.install(
File "/usr/lib/python3/dist-packages/zc/buildout/easy_install.py", line 957, in install
return installer.install(specs, working_set)
File "/usr/lib/python3/dist-packages/zc/buildout/easy_install.py", line 682, in install
for dist in self._get_dist(requirement, ws):
File "/usr/lib/python3/dist-packages/zc/buildout/easy_install.py", line 574, in _get_dist
dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
File "/usr/lib/python3/dist-packages/zc/buildout/easy_install.py", line 1745, in _move_to_eggs_dir_and_compile
[tmp_loc] = glob.glob(os.path.join(tmp_dest, '*'))
ValueError: not enough values to unpack (expected 1, got 0)
From your comment it seems you have a lot of different Python versions installed; 2.7, 3.6, 3.7 and 3.8.
Normally, having multiple versions of Python 3 installed is not a problem in and of itself. But it can lead to mistakes.
Especially since there usually is a python3 link that can only point to one version.
So what I suspect that happened is that you installed bob.extensions for a different Python version then the one you are using for bob.paper.
Or you installed it in a different virtual environment (if you are using those)!
My recommendation is to check if you really need all the different versions. If not, note down which packages you have installed for the different Python version and decide which ones you need.
Then delete all Python versions except 3.8, and make sure that there is a link python3 pointing to python3.8.
Then install all the prequisites and bob.extensions and bob.paper on that.
I've never used conda on a non-windows machine, and normally I would advise to stick with python from python.org, or whatever your distribution has packages for.
I am trying to install a reasonable python 3 on an AWS m6g instance - this is their latest and greatest, and therein lies the rub. It is an ARM64 box, so there is no anaconda install for that (that I know of). I am installing packages manually via pip3, and after much loading of the requisite system packages, compilers, and so on, things mostly work WITH THE EXCEPTION OF matplotlib, which comes up with (sorry, don't know how to indent all of the below four spaces). Any ideas?
pip3 install matplotlib --user
Collecting matplotlib
Using cached https://files.pythonhosted.org/packages/9c/4b/06f4aa9bef6b5e4f177881b4dedd94faa6e7cb3d95dfaeaa8a1a8b541095/matplotlib-3.2.2.tar.gz
Collecting cycler>=0.10 (from matplotlib)
Using cached https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
Collecting kiwisolver>=1.0.1 (from matplotlib)
Using cached https://files.pythonhosted.org/packages/62/b8/db619d97819afb52a3ff5ff6ad3f7de408cc83a8ec2dfb31a1731c0a97c2/kiwisolver-1.2.0.tar.gz
Complete output from command python setup.py egg_info:
warning: no files found matching '*.png' under directory 'docs/source'
no previously-included directories found matching '.git'
no previously-included directories found matching 'dist'
no previously-included directories found matching 'build'
no previously-included directories found matching 'docs/build'
zip_safe flag not set; analyzing archive contents...
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-c8bpoixa/cppy-1.1.0/setup.py", line 24, in <module>
'py/solver.cpp',
File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 218, in run
os.path.join(archive_root, 'EGG-INFO'), self.zip_safe()
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 269, in zip_safe
return analyze_egg(self.bdist_dir, self.stubs)
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 379, in analyze_egg
safe = scan_module(egg_dir, base, name, stubs) and safe
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 416, in scan_module
code = marshal.load(f)
ValueError: bad marshal data (unknown type code)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-6x1f9zgp/kiwisolver/setup.py", line 80, in <module>
cmdclass={'build_ext': BuildExt},
File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 128, in setup
_install_setup_requires(attrs)
File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 123, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 461, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 866, in resolve
replace_conflicting=replace_conflicting
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1146, in best_match
return self.obtain(req, installer)
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1158, in obtain
return installer(requirement)
File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 528, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 672, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 698, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 881, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1149, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1135, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
raise
File "/usr/lib64/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib64/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/usr/lib/python3.7/site-packages/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-c8bpoixa/cppy-1.1.0/setup.py", line 24, in <module>
'py/solver.cpp',
File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 218, in run
os.path.join(archive_root, 'EGG-INFO'), self.zip_safe()
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 269, in zip_safe
return analyze_egg(self.bdist_dir, self.stubs)
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 379, in analyze_egg
safe = scan_module(egg_dir, base, name, stubs) and safe
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 416, in scan_module
code = marshal.load(f)
ValueError: bad marshal data (unknown type code)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-6x1f9zgp/kiwisolver/
[ec2-user#ip-172-31-71-160 bin]$
Many of the dependencies of matplotlib have had new aarch64 wheels uploaded to pypi.org in the last few months since you posted this question. matplotlib itself doesn't have an aarch64 wheel available yet, but recently a change was merged to build one, so it probably will have one available soon. Even though matplotlib doesn't have a binary wheel published yet, I was able to install it on Ubuntu 20.04. It takes a minute or two to build, but it works:
$ sudo apt update
$ sudo apt install python3-pip
$ sudo pip3 install matplotlib
For completeness, I was able to get a full suite of python data science packages installed on Ubuntu 20.04 Arm with the following Dockerfile. (Just run the apt and pip commands if you aren't using Docker.) It takes a long time to complete since it builds many of these packages from source.
As more python packages begin publishing aarch64 wheels, this should become obsolete.
FROM ubuntu:focal
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
python3-pip \
python3-dev \
libfreetype-dev \
libopenblas64-dev \
mklibs \
libmlpack-dev \
libatlas-base-dev \
liblapack64-dev \
libffi-dev \
gfortran
RUN pip3 install jupyterlab matplotlib numpy pandas seaborn
After upgrading pip, I try to do a 'pip freeze', but i've this error :
# pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB)
100% |################################| 1.3MB 737kB/s
Installing collected packages: pip
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
Successfully uninstalled pip-9.0.1
Successfully installed pip-10.0.1
# pip freeze
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in <module>
from pip._internal import main
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/__init__.py", line 42, in <module>
from pip._internal import cmdoptions
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/cmdoptions.py", line 16, in <module>
from pip._internal.index import (
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/index.py", line 15, in <module>
from pip._vendor import html5lib, requests, six
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py", line 86, in <module>
from pip._vendor.urllib3.contrib import pyopenssl
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/contrib/pyopenssl.py", line 46, in <module>
import OpenSSL.SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 105, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
Reading some post here, I found various solutions, but it's not working.
So I try another things, like installing using easy_install :
# sudo python -m easy_install --upgrade pyOpenSSL
Searching for pyOpenSSL
Reading https://pypi.python.org/simple/pyOpenSSL/
Best match: pyOpenSSL 18.0.0
Downloading https://files.pythonhosted.org/packages/9b/7c/ee600b2a9304d260d96044ab5c5e57aa489755b92bbeb4c0803f9504f480/pyOpenSSL-18.0.0.tar.gz#sha256=6488f1423b00f73b7ad5167885312bb0ce410d3312eb212393795b53c8caa580
Processing pyOpenSSL-18.0.0.tar.gz
Writing /tmp/easy_install-_qJ8_t/pyOpenSSL-18.0.0/setup.cfg
Running pyOpenSSL-18.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-_qJ8_t/pyOpenSSL-18.0.0/egg-dist-tmp-KM4cDC
warning: no previously-included files found matching 'leakcheck'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files matching '*.py' found under directory 'leakcheck'
warning: no previously-included files matching '*.pem' found under directory 'leakcheck'
warning: no previously-included files matching '*.cert' found under directory 'examples/simple'
warning: no previously-included files matching '*.pkey' found under directory 'examples/simple'
no previously-included directories found matching 'doc/_build'
no previously-included directories found matching '.travis'
no previously-included directories found matching '.mention-bot'
zip_safe flag not set; analyzing archive contents...
Adding pyOpenSSL 18.0.0 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/pyOpenSSL-18.0.0-py2.7.egg
Processing dependencies for pyOpenSSL
Searching for cryptography>=2.2.1
Reading https://pypi.python.org/simple/cryptography/
Best match: cryptography 2.2.2
Downloading https://files.pythonhosted.org/packages/ec/b2/faa78c1ab928d2b2c634c8b41ff1181f0abdd9adf9193211bd606ffa57e2/cryptography-2.2.2.tar.gz#sha256=9fc295bf69130a342e7a19a39d7bbeb15c0bcaabc7382ec33ef3b2b7d18d2f63
Processing cryptography-2.2.2.tar.gz
Writing /tmp/easy_install-rHRU6X/cryptography-2.2.2/setup.cfg
Running cryptography-2.2.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-rHRU6X/cryptography-2.2.2/egg-dist-tmp-eABQpn
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/lib/python2.7/dist-packages/easy_install.py", line 5, in <module>
main()
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 2199, in main
lambda: setup(
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 2185, in with_ei_usage
return f()
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 2202, in <lambda>
distclass=DistributionWithoutHelpCommands, **kw
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 393, in run
self.easy_install(spec, not self.no_deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 636, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 668, in install_item
self.process_distribution(spec, dist, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 716, in process_distribution
[requirement], self.local_index, self.easy_install
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 631, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 874, in best_match
return self.obtain(req, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 886, in obtain
return installer(requirement)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 636, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 666, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 856, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1078, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1063, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 68, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 114, in run
return func()
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 67, in runner
_execfile(setup_script, ns)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 43, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-rHRU6X/cryptography-2.2.2/setup.py", line 28, in <module>
RuntimeError: cryptography requires setuptools 18.5 or newer, please upgrade to a newer version of setuptools
and, so, upgrading 'setuptools' :
# sudo python -m easy_install --upgrade setuptools
Searching for setuptools
Reading https://pypi.python.org/simple/setuptools/
Best match: setuptools 39.2.0
Downloading https://files.pythonhosted.org/packages/1a/04/d6f1159feaccdfc508517dba1929eb93a2854de729fa68da9d5c6b48fa00/setuptools-39.2.0.zip#sha256=f7cddbb5f5c640311eb00eab6e849f7701fa70bf6a183fc8a2c33dd1d1672fb2
Processing setuptools-39.2.0.zip
Writing /tmp/easy_install-wH5_qA/setuptools-39.2.0/setup.cfg
Running setuptools-39.2.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-wH5_qA/setuptools-39.2.0/egg-dist-tmp-cpMLIT
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls'
warnings.warn(msg)
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/lib/python2.7/dist-packages/easy_install.py", line 5, in <module>
main()
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 2199, in main
lambda: setup(
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 2185, in with_ei_usage
return f()
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 2202, in <lambda>
distclass=DistributionWithoutHelpCommands, **kw
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 393, in run
self.easy_install(spec, not self.no_deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 636, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 666, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 856, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1078, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1063, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 68, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 114, in run
return func()
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 67, in runner
_execfile(setup_script, ns)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 43, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-wH5_qA/setuptools-39.2.0/setup.py", line 195, in <module>
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 266, in __init__
_Distribution.__init__(self,attrs)
File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 301, in finalize_options
ep.load()(self, ep.name, value)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2195, in load
raise ImportError("%r has no %r attribute" % (entry, attr))
ImportError: <module 'setuptools.dist' from '/usr/lib/python2.7/dist-packages/setuptools/dist.pyc'> has no 'check_specifier' attribute
And, the last try, using a specific version of pyOpenSSL :
# sudo pip install pyOpenSSL==16.2.0
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in <module>
from pip._internal import main
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/__init__.py", line 42, in <module>
from pip._internal import cmdoptions
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/cmdoptions.py", line 16, in <module>
from pip._internal.index import (
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/index.py", line 15, in <module>
from pip._vendor import html5lib, requests, six
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py", line 86, in <module>
from pip._vendor.urllib3.contrib import pyopenssl
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/contrib/pyopenssl.py", line 46, in <module>
import OpenSSL.SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 105, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
Another idea to resolve this please ? :)
Thanks a lot.
F.
The problem is coming from pyopenssl. The first thing you can do is trying to remove and re-install pyopenssl :
apt-get --auto-remove --yes remove python-openssl
pip install pyOpenSSL
But it also could be a path problem.
Upgrading the OS-provided pip is a well-known 'own goal' and should be avoided unless absolutely necessary.
First, you may need to re-install the OS package, to restore normal use of the 'pip' command.
If you must have a newer pip: try installing it from a self-contained installer, see here: https://pip.pypa.io/en/stable/installing/ and not with the existing pip. Unless you must have it available for all users, run the install with '--user' option - and use the same option when installing packages with pip - that way you leave the OS-provided Python and pip things alone and don't overwrite them and can always return to them by deleting everything Python-related from ~/.local/.
In all cases, after you recover from pip being stuck as you have it right now, try upgrading pyOpenSSL first (or pip install-ing it with --user).
Another helpful tip that I found somewhere on the Web: always use python -m pip instead of running pip directly, this avoids problems with pip picking up the wrong version or the pip module (or running the wrong python executable, if you've got more than one).
I have problem with python package installer pip. When I try to install a package in Pycharm, I get following error:
Error: Python packaging tool 'pip' not found
If I try install a package from terminal using pip, I get
$ sudo pip install matplotlib
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==7.1.0', 'console_scripts', 'pip')()
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg
/pkg_resources/__init__.py", line 558, in load_entry_point
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg /pkg_resources/__init__.py", line 2682, in load_entry_point
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/pkg_resources/__init__.py", line 2355, in load
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/pkg_resources/__init__.py", line 2361, in resolve
ImportError: No module named 'pip'
I tried to uninstall pip by easy_install
$ sudo easy_install -mxN pip
Searching for pip
Best match: pip 7.1.0
Processing pip-7.1.0-py3.5.egg
Using /usr/local/lib/python3.5/dist-packages/pip-7.1.0-py3.5.egg
Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:
pkg_resources.require("pip") # latest installed version
pkg_resources.require("pip==7.1.0") # this exact version
pkg_resources.require("pip>=7.1.0") # this version or higher
and by pip
$ sudo pip uninstall pip
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==7.1.0', 'console_scripts', 'pip')()
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg
/pkg_resources/__init__.py", line 558, in load_entry_point
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg /pkg_resources/__init__.py", line 2682, in load_entry_point
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/pkg_resources/__init__.py", line 2355, in load
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/pkg_resources/__init__.py", line 2361, in resolve
ImportError: No module named 'pip'
But files easy_install ; easy_install-3.5 ; f2py ; pip ; pip3 ; pip3.5 still remained in /usr/local/bin . I think these files prevent correctly reinstalling pip.
I am using Ubuntu 16.04. I am using python 3.5
What should I do to install python packages?
EDIT:
After reinstalling python by:sudo apt install python3-pip
I still get error if try to install any package:
sudo pip install cairocffi
[sudo] password for olger:
The directory '/home/olger/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/olger/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting cairocffi
Downloading cairocffi-0.7.2.tar.gz (75kB)
100% |████████████████████████████████| 81kB 491kB/s
Complete output from command python setup.py egg_info:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
compilation terminated.
Traceback (most recent call last):
File "/usr/lib/python3.5/distutils/unixccompiler.py", line 118, in _compile
extra_postargs)
File "/usr/lib/python3.5/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/lib/python3.5/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/usr/lib/python3.5/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/command/bdist_egg.py", line 160, in run
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/command/bdist_egg.py", line 146, in call_command
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/command/install_lib.py", line 10, in run
File "/usr/lib/python3.5/distutils/command/install_lib.py", line 109, in build
self.run_command('build_ext')
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/command/build_ext.py", line 49, in run
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 338, in run
self.build_extensions()
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 447, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 472, in _build_extensions_serial
self.build_extension(ext)
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/command/build_ext.py", line 174, in build_extension
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 532, in build_extension
depends=ext.depends)
File "/usr/lib/python3.5/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/lib/python3.5/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 152, in save_modules
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 193, in setup_context
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 237, in run_setup
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 267, in run
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 236, in runner
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 46, in _execfile
File "/tmp/easy_install-zlcvz3si/cffi-1.7.0/setup.py", line 192, in <module>
File "/usr/lib/python3.5/distutils/core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/command/easy_install.py", line 1056, in run_setup
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 240, in run_setup
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 193, in setup_context
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 164, in save_modules
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 139, in resume
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/compat.py", line 65, in reraise
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 152, in save_modules
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 193, in setup_context
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 237, in run_setup
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 267, in run
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 236, in runner
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/sandbox.py", line 46, in _execfile
File "/tmp/easy_install-zlcvz3si/cffi-1.7.0/setup.py", line 192, in <module>
File "/usr/lib/python3.5/distutils/core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-u6rhv636/cairocffi/setup.py", line 65, in <module>
**cffi_args
File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/dist.py", line 268, in __init__
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/dist.py", line 313, in fetch_build_eggs
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/pkg_resources/__init__.py", line 836, in resolve
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/pkg_resources/__init__.py", line 1081, in best_match
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/pkg_resources/__init__.py", line 1093, in obtain
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/dist.py", line 380, in fetch_build_egg
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/command/easy_install.py", line 629, in easy_install
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/command/easy_install.py", line 659, in install_item
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/command/easy_install.py", line 842, in install_eggs
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/command/easy_install.py", line 1070, in build_and_install
File "/usr/local/lib/python3.5/dist-packages/setuptools-18.1-py3.5.egg/setuptools/command/easy_install.py", line 1058, in run_setup
distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-u6rhv636/cairocffi/
You are using pip version 7.1.0, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
EDIT 2:
Another interesting thing is that, if I try to run any PIP command, I get:
$ pip show pycairo
You are using pip version 7.1.0, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
but if I check version of PIP, I get:
$ pip --version
pip 8.1.2 from /home/olger/.local/lib/python3.5/site-packages (python 3.5)
Maybe it is because last version of pip is not correctly uninsatlled.
I am trying to play with zfec, a fast erasure codec which can be used as a command line utility. The error I get is:
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2022' in position 697: ordinal not in range(128)
Any ideas on how to remedy this? As a reference, here is the full textual output from the test:
$ python ./setup.py test
running test
Searching for argparse>=0.8
Reading http://pypi.python.org/simple/argparse/
Best match: argparse 1.2.1
Downloading http://argparse.googlecode.com/files/argparse-1.2.1.tar.gz#md5=2fbef8cb61e506c706957ab6e135840c
Processing argparse-1.2.1.tar.gz
Running argparse-1.2.1/setup.py -q bdist_egg --dist-dir /var/folders/dd/z2b28q_n0j5fb8qmxhrn80200000gn/T/easy_install-5I4rNB/argparse-1.2.1/egg-dist-tmp-0yDZUv
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.orig' found anywhere in distribution
warning: no previously-included files matching '*.rej' found anywhere in distribution
no previously-included directories found matching 'doc/_build'
no previously-included directories found matching 'env24'
no previously-included directories found matching 'env25'
no previously-included directories found matching 'env26'
no previously-included directories found matching 'env27'
zip_safe flag not set; analyzing archive contents...
Installed /Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/argparse-1.2.1-py2.5.egg
Searching for pyutil>=1.3.19
Reading http://pypi.python.org/simple/pyutil/
Best match: pyutil 1.9.7
Downloading https://pypi.python.org/packages/source/p/pyutil/pyutil-1.9.7.tar.gz#md5=5a20ccae479d967d3fa11b905d0e10f6
Processing pyutil-1.9.7.tar.gz
Running pyutil-1.9.7/setup.py -q bdist_egg --dist-dir /var/folders/dd/z2b28q_n0j5fb8qmxhrn80200000gn/T/easy_install-oG8lMI/pyutil-1.9.7/egg-dist-tmp-2t_5qj
running test
Searching for pyutil>=1.3.19
Reading http://pypi.python.org/simple/pyutil/
Best match: pyutil 1.9.7
Downloading https://pypi.python.org/packages/source/p/pyutil/pyutil-1.9.7.tar.gz#md5=5a20ccae479d967d3fa11b905d0e10f6
Processing pyutil-1.9.7.tar.gz
Running pyutil-1.9.7/setup.py -q bdist_egg --dist-dir /var/folders/dd/z2b28q_n0j5fb8qmxhrn80200000gn/T/easy_install-owyC0b/pyutil-1.9.7/egg-dist-tmp-IZuxzi
Traceback (most recent call last):
File "./setup.py", line 191, in <module>
_setup(repr(readmetext))
File "./setup.py", line 185, in _setup
zip_safe=False, # I prefer unzipped for easier access.
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/core.py", line 151, in setup
dist.run_commands()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 986, in run_commands
self.run_command(cmd)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 1006, in run_command
cmd_obj.run()
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/setuptools/command/test.py", line 111, in run
self.distribution.fetch_build_eggs(self.distribution.install_requires)
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/setuptools/dist.py", line 284, in fetch_build_eggs
parse_requirements(requires), installer=self.fetch_build_egg
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/pkg_resources.py", line 573, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/pkg_resources.py", line 823, in best_match
return self.obtain(req, installer) # try and download/install
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/pkg_resources.py", line 835, in obtain
return installer(requirement)
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/setuptools/dist.py", line 327, in fetch_build_egg
return cmd.easy_install(req)
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/setuptools/command/easy_install.py", line 453, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/setuptools/command/easy_install.py", line 483, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/setuptools/command/easy_install.py", line 663, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/setuptools/command/easy_install.py", line 938, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/setuptools/command/easy_install.py", line 927, in run_setup
run_setup(setup_script, args)
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/setuptools/sandbox.py", line 62, in run_setup
lambda: execfile(
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/setuptools/sandbox.py", line 105, in run
return func()
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/setuptools/sandbox.py", line 64, in <lambda>
{'__file__':setup_script, '__name__':'__main__'}
File "setup.py", line 117, in <module>
# before building sdists or eggs:
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/core.py", line 151, in setup
dist.run_commands()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 986, in run_commands
self.run_command(cmd)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 1006, in run_command
cmd_obj.run()
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/setuptools/command/bdist_egg.py", line 167, in run
self.run_command("egg_info")
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 1006, in run_command
cmd_obj.run()
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/setuptools/command/egg_info.py", line 170, in run
writer(self, ep.name, os.path.join(self.egg_info,ep.name))
File "/Users/Andrew/Documents/Academic Work/Computing/Extracurricular Programming/zfec-1.4.24/setuptools-0.6c16dev3.egg/setuptools/command/egg_info.py", line 379, in write_pkg_info
metadata.write_pkg_info(cmd.egg_info)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 1088, in write_pkg_info
self.write_pkg_file(pkg_info)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 1113, in write_pkg_file
file.write('Description: %s\n' % long_desc)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2022' in position 697: ordinal not in range(128)
Try to install pyutil, it worked for me.
This guys solved a similar problem installing pyutil in this link.