Ascii error in test of zfec utility - python

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.

Related

python on an AWS m6g instance

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

Rasperry Pi2 Intalling Pillow

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.

unable to install package using PIP for python

I am having issues installing any package on mac os. I have tried updating pip , installed python. uninstalled python and bunch of other stuff that I have tried.
Ran the command pip3 install indicoio
error as below kindly share your thoughts on how I can overcome this error
Collecting indicoio
Using cached IndicoIo-1.0.4.tar.gz
Complete output from command python setup.py egg_info:
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 '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
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 156, in save_modules
yield saved
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 246, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 276, in run
return func()
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 245, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-mq2t7d4s/Pillow-3.4.2/setup.py", line 753, in <module>
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/site-packages/setuptools/command/bdist_egg.py", line 161, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/bdist_egg.py", line 147, in call_command
self.run_command(cmdname)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/build_ext.py", line 338, in run
self.build_extensions()
File "/tmp/easy_install-mq2t7d4s/Pillow-3.4.2/setup.py", line 521, in build_extensions
ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-build-669f5s37/indicoio/setup.py", line 52, in <module>
"futures >= 3.0.0"
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.5/site-packages/setuptools/dist.py", line 348, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/lib/python3.5/site-packages/setuptools/dist.py", line 394, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1098, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1110, in obtain
return installer(requirement)
File "/usr/local/lib/python3.5/site-packages/setuptools/dist.py", line 461, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 664, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 694, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 875, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1114, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1100, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 249, in run_setup
raise
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 168, in save_modules
saved_exc.resume()
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 143, in resume
six.reraise(type, exc, self._tb)
File "/usr/local/lib/python3.5/site-packages/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 156, in save_modules
yield saved
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 246, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 276, in run
return func()
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 245, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-mq2t7d4s/Pillow-3.4.2/setup.py", line 753, in <module>
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/site-packages/setuptools/command/bdist_egg.py", line 161, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/bdist_egg.py", line 147, in call_command
self.run_command(cmdname)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/build_ext.py", line 338, in run
self.build_extensions()
File "/tmp/easy_install-mq2t7d4s/Pillow-3.4.2/setup.py", line 521, in build_extensions
ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-669f5s37/indicoio/
Try using:
sudo python setup.py install
In the directory that you installed the folder. If that doesn't work try
python setup.py --help-command
Above is the code that showed me the other commands on Windows I am not sure what the equivalent is on Mac. But I found specific installation functions such as install_lib and install_scripts.

failed in "sudo pip install ggplot"

Happy new year,
I tried to install the ggplot on my ubuntu 14.04 and got the following error message (code)
my verson of python-dev 2.7.5-5ubuntu3.
I have already did the following
sudo apt-get update
sudo apt-get upgrade gcc
sudo apt-get install python2.7-dev
william#ubuntu:~$ sudo pip install ggplot
[sudo] password for william:
Downloading/unpacking ggplot
Downloading ggplot-0.6.5.tar.gz (8.4MB): 8.4MB downloaded
Running setup.py (path:/tmp/pip_build_root/ggplot/setup.py) egg_info for package ggplot
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python3/dist-packages (from ggplot)
Downloading/unpacking statsmodels (from ggplot)
Downloading statsmodels-0.6.1.tar.gz (7.0MB): 7.0MB downloaded
Running setup.py (path:/tmp/pip_build_root/statsmodels/setup.py) egg_info for package statsmodels
/bin/sh: 1: svnversion: not found
/bin/sh: 1: svnversion: not found
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’ [enabled by default]
int exp (void);
^
_configtest.o: In function `main':
/tmp/easy_install-1xuwcszp/numpy-1.9.1/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’ [enabled by default]
int exp (void);
^
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
Running from numpy source directory.
/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/system_info.py:1526: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/system_info.py:1432: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/statsmodels/setup.py", line 449, in <module>
**setuptools_kwargs)
File "/usr/lib/python3.4/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 262, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 287, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 618, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 870, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 882, in obtain
return installer(requirement)
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 338, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 613, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 643, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 833, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 1055, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 1040, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 68, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 114, in run
return func()
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 67, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 43, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/setup.py", line 251, in <module>
self._clean_exclude = ["bspline_ext.c",
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/setup.py", line 243, in setup_package
"""Custom distutils command to clean the .so and .pyc files."""
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/core.py", line 169, in setup
File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/bdist_egg.py", line 152, in run
self.run_command("egg_info")
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/egg_info.py", line 10, in run
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 153, in run
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 170, in build_sources
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 329, in build_extension_sources
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 386, in generate_sources
File "numpy/core/setup.py", line 432, in generate_config_h
File "numpy/core/setup.py", line 42, in check_types
File "numpy/core/setup.py", line 293, in check_types
if not os.path.exists(src):
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
non-existing path in 'numpy/distutils': 'site.cfg'
non-existing path in 'numpy/f2py': 'docs'
non-existing path in 'numpy/f2py': 'f2py.1'
non-existing path in 'numpy/lib': 'benchmarks'
_configtest.o: In function `main':
/tmp/easy_install-1xuwcszp/numpy-1.9.1/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
Complete output from command python setup.py egg_info:
/bin/sh: 1: svnversion: not found
/bin/sh: 1: svnversion: not found
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’ [enabled by default]
int exp (void);
^
_configtest.o: In function `main':
/tmp/easy_install-1xuwcszp/numpy-1.9.1/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’ [enabled by default]
int exp (void);
^
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
Running from numpy source directory.
/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/system_info.py:1526: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/system_info.py:1432: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/statsmodels/setup.py", line 449, in <module>
**setuptools_kwargs)
File "/usr/lib/python3.4/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 262, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 287, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 618, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 870, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 882, in obtain
return installer(requirement)
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 338, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 613, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 643, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 833, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 1055, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 1040, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 68, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 114, in run
return func()
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 67, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 43, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/setup.py", line 251, in <module>
self._clean_exclude = ["bspline_ext.c",
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/setup.py", line 243, in setup_package
"""Custom distutils command to clean the .so and .pyc files."""
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/core.py", line 169, in setup
File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/bdist_egg.py", line 152, in run
self.run_command("egg_info")
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/egg_info.py", line 10, in run
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 153, in run
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 170, in build_sources
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 329, in build_extension_sources
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 386, in generate_sources
File "numpy/core/setup.py", line 432, in generate_config_h
File "numpy/core/setup.py", line 42, in check_types
File "numpy/core/setup.py", line 293, in check_types
if not os.path.exists(src):
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
non-existing path in 'numpy/distutils': 'site.cfg'
non-existing path in 'numpy/f2py': 'docs'
non-existing path in 'numpy/f2py': 'f2py.1'
non-existing path in 'numpy/lib': 'benchmarks'
_configtest.o: In function `main':
/tmp/easy_install-1xuwcszp/numpy-1.9.1/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/statsmodels
Storing debug log for failure in /home/william/.pip/pip.log
william#ubuntu:~$
Many thanks for your help
This is a common error when you're missing the python-dev package. You can install it using:
sudo apt-get install python-dev
Try installing after you have this package.
Edit:
As the other answer mentioned, to get python-dev for python 3:
sudo apt-get install python3-dev
From the paths in that log, it could be that your pip is installing this for Python 3. python-dev won't do in that case, you'd need package python3-dev to get Python.h for Python 3.

why Installing external package in canopy python gives valueEror in windows?

This question has been asked a couple of times and I spend at least five hours trying to incorporate suggestions in those posts [but was mostly unsuccessful.
I installed Canopy Enthought python on my windows and now I want to install Levenshtein package available at https://code.google.com/p/pylevenshtein/.
I extracted and tried to run using usual python command but got the following error.
(Canopy 64bit) C:\Users\mary\Desktop>cd python-Levenshtein-0.11.2
(Canopy 64bit) C:\Users\mary\Desktop\python-Levenshtein-0.11.2>python setup.
py install
running install
running bdist_egg
running egg_info
writing requirements to python_Levenshtein.egg-info\requires.txt
writing python_Levenshtein.egg-info\PKG-INFO
writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt
writing top-level names to python_Levenshtein.egg-info\top_level.txt
writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
writing entry points to python_Levenshtein.egg-info\entry_points.txt
reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'docs'
warning: no previously-included files matching '*pyc' found anywhere in distribu
tion
warning: no previously-included files matching '.project' found anywhere in dist
ribution
warning: no previously-included files matching '.pydevproject' found anywhere in
distribution
writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_ext
building 'Levenshtein' extension
Traceback (most recent call last):
File "setup.py", line 46, in <module>
""",
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Users\mary\AppData\Local\Enthought\Canopy\User\lib\site-packages\
setuptools\command\install.py", line 73, in run
self.do_egg_install()
File "C:\Users\mary\AppData\Local\Enthought\Canopy\User\lib\site-packages\
setuptools\command\install.py", line 93, in do_egg_install
self.run_command('bdist_egg')
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Users\mary\AppData\Local\Enthought\Canopy\User\lib\site-packages\
setuptools\command\bdist_egg.py", line 179, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "C:\Users\mary\AppData\Local\Enthought\Canopy\User\lib\site-packages\
setuptools\command\bdist_egg.py", line 166, in call_command
self.run_command(cmdname)
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Users\mary\AppData\Local\Enthought\Canopy\User\lib\site-packages\
setuptools\command\install_lib.py", line 20, in run
self.build()
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\command\install_lib.py", line 111, in build
self.run_command('build_ext')
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Users\mary\AppData\Local\Enthought\Canopy\User\lib\site-packages\
setuptools\command\build_ext.py", line 46, in run
_build_ext.run(self)
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\command\build_ext.py", line 337, in run
self.build_extensions()
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\command\build_ext.py", line 446, in build_extens
ions
self.build_extension(ext)
File "C:\Users\mary\AppData\Local\Enthought\Canopy\User\lib\site-packages\
setuptools\command\build_ext.py", line 182, in build_extension
_build_ext.build_extension(self,ext)
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\command\build_ext.py", line 496, in build_extens
ion
depends=ext.depends)
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\msvc9compiler.py", line 514, in compile
self.initialize()
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\msvc9compiler.py", line 424, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Users\mary\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.
0.1938.win-x86_64\lib\distutils\msvc9compiler.py", line 340, in query_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: [u'path']
(Canopy 64bit) C:\Users\mary\Desktop\python-Levenshtein-0.11.2>
I followed these posts but remained unsuccessful in solving this issue:
Errors while building/installing C module for Python 2.7
http://springflex.blogspot.com/2014/02/how-to-fix-valueerror-when-trying-to.html
Any help will be greatly appreciated.
This is an error, badly handled by Python 2.7's distutils. The underlying meaning is "You must have Visual C++ 2008 installed to do this build". Other than that, I suggest installing Gohlke's build: http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-levenshtein

Categories

Resources