I just was trying to install yowsup on my new Raspberry Pi. Everything went fine, until it was about to install Pillow. I got the following error message:
Processing dependencies for yowsup2==2.4
Searching for pillow
Reading http://pypi.python.org/simple/pillow/
Best match: Pillow 3.0.0
Downloading https://pypi.python.org/packages/source/P/Pillow/Pillow-3.0.0.zip#md5=dd81f6cc3f3a5e5fe72f0f1d936339c3
Processing Pillow-3.0.0.zip
Running Pillow-3.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-AlZEzs/Pillow-3.0.0/egg-dist-tmp-rX2XN3
Exception in thread Thread-1 (most likely raised during interpreter shutdown):Exception in thread Thread-2 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_innerTraceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 505, in run File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
File "/usr/lib/python2.7/multiprocessing/pool.py", line 353, in _handle_tasks File "/usr/lib/python2.7/threading.py", line 505, in run
File "/usr/lib/python2.7/multiprocessing/pool.py", line 329, in _handle_workers
<type 'exceptions.TypeError'>: 'NoneType' object is not callable
Exception
TypeError<type 'exceptions.TypeError'>: 'NoneType' object is not callable
: TypeError("'NoneType' object does not support item deletion",) in <Finalize object, dead> ignored
Traceback (most recent call last):
File "setup.py", line 42, in <module>
'Topic :: Software Development :: Libraries :: Python Modules'
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/lib/python2.7/dist-packages/setuptools/command/install.py", line 73, in run
self.do_egg_install()
File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 101, in do_egg_install
cmd.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 368, in run
self.easy_install(spec, not self.no_deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 588, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 640, in install_item
self.process_distribution(spec, dist, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 692, in process_distribution
[requirement], self.local_index, self.easy_install
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 576, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 821, in best_match
return self.obtain(req, installer) # try and download/install
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 833, in obtain
return installer(requirement)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 608, 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 638, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 828, 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 1105, 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 1094, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 30, in run_setup
lambda: execfile(
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 72, in run
return func()
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 32, in <lambda>
{'__file__':setup_script, '__name__':'__main__'}
File "setup.py", line 767, in <module>
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/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 179, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 166, in call_command
self.run_command(cmdname)
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
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/install_lib.py", line 20, in run
self.build()
File "/usr/lib/python2.7/distutils/command/install_lib.py", line 111, in build
self.run_command('build_ext')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "setup.py", line 515, in build_extensions
ValueError: --enable-jpeg requested but jpeg not found, aborting.
I googeled it for at least an hour, but couldn't find a correct answer. Do you have any suggestions for me?
So it looks like you're trying to install PIL without the proper packages installed beforehand. Try installing libjpeg.
sudo apt-get install libjpeg-dev
If you look at the External Libraries section of the Pillow docs, you'll see that there are a number of libraries that should be present, including libjpeg and zlib. If you don't want JPEG support, you should download the "source" archive from PyPI, unzip it, then in the resulting directory run python setup.py install --disable-jpeg.
However, I wouldn't recommend this, as you won't be able to process JPEGs with Pillow. Instead, use the package manager on your Pi to install all of the libraries for which you'd like support, then re-run pip install pillow.
Related
I have a setup.py file that looks like this:
from setuptools import setup
setup(
name='yeet',
install_requires=[
'cmake>=3.15.3',
'Cython>=0.29.21',
'glob2>=0.6',
'hdbscan>=0.8.24',
],
)
When I run python setup.py install using a Python 3.7 conda environment, I get:
Traceback (most recent call last):
File "setup.py", line 66, in <module>
'pixplot=pixplot:parse',
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/install.py", line 117, in do_egg_install
cmd.run(show_deprecation=False)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 408, in run
self.easy_install(spec, not self.no_deps)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 650, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 697, in install_item
self.process_distribution(spec, dist, deps)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 742, in process_distribution
[requirement], self.local_index, self.easy_install
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 766, in resolve
replace_conflicting=replace_conflicting
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1049, in best_match
return self.obtain(req, installer)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1061, in obtain
return installer(requirement)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 669, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 695, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 880, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1150, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1134, in run_setup
run_setup(setup_script, args)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 257, in run_setup
raise
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 193, in setup_context
yield
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 164, in save_modules
saved_exc.resume()
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 139, in resume
raise exc.with_traceback(self._tb)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 152, in save_modules
yield saved
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 193, in setup_context
yield
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 254, in run_setup
_execfile(setup_script, ns)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 43, in _execfile
exec(code, globals, locals)
File "/var/folders/cy/ywx04ttn12n_xmgjf5s6sbzr0000gn/T/easy_install-ogn8e84n/hdbscan-0.8.26/setup.py", line 94, in <module>
ImportError: Cython not found! Please install cython and try again
Does anyone know why Cython isn't installed, given the fact that it's in my setup.py file? I know I can install Cython, but I'd like to prevent users from hitting this snag. Is the solution here for hdbscan to add Cython to its list of dependencies? Any pointers others can offer would be hugely appreciated!
I think you should try something like this.
from setuptools import setup, Extension
setup(
...
setup_requires=[
'setuptools>= 50.3.0',
'cython',
or something like this.
from setuptools import dist
dist.Distribution().fetch_build_eggs('Cython>=0.29.21')
Look in to the following post for more details.
https://luminousmen.com/post/resolve-cython-and-numpy-dependencies
I am now trying to run a program on a super computer on which I cannot run sudo or easy_install. The program needs pandas so I need to pip install pandas but I keep getting this error message even thought I have tried "pip install --upgrade pip" already.
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
--edit--
Here is the error message when I pip3 install pandas.
pip3 install pandas
Collecting pandas
Using cached pandas-0.22.0.tar.gz
Complete output from command python setup.py egg_info:
Running from numpy source directory.
/tmp/easy_install-gv5il123/numpy-1.14.1/setup.py:369: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
/usr/lib64/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/system_info.py:624: 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.
self.calc_info()
/usr/lib64/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
/usr/lib64/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 239, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 269, in run
return func()
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 238, in runner
_execfile(setup_script, ns)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-gv5il123/numpy-1.14.1/setup.py", line 394, in <module>
File "/tmp/easy_install-gv5il123/numpy-1.14.1/setup.py", line 386, in setup_package
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/core.py", line 169, in setup
File "/usr/lib64/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.4/site-packages/setuptools/command/bdist_egg.py", line 151, in run
self.run_command("egg_info")
File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/egg_info.py", line 26, in run
File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 148, in run
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 165, in build_sources
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 324, in build_extension_sources
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 377, in generate_sources
File "numpy/core/setup.py", line 422, in generate_config_h
return tag
File "numpy/core/setup.py", line 48, in check_types
min_numpy_ver = '1.9.0'
File "numpy/core/setup.py", line 281, in check_types
pjoin(ujson_lib,'ultrajsondec.c'),
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-xqyfs1o1/pandas/setup.py", line 743, in <module>
**setuptools_kwargs)
File "/usr/lib64/python3.4/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python3.4/site-packages/setuptools/dist.py", line 268, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python3.4/site-packages/setuptools/dist.py", line 312, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 846, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1091, in best_match
return self.obtain(req, installer)
File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1103, in obtain
return installer(requirement)
File "/usr/lib/python3.4/site-packages/setuptools/dist.py", line 379, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 638, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 668, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 851, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1079, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1065, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 242, in run_setup
raise
File "/usr/lib64/python3.4/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib64/python3.4/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 141, in resume
compat.reraise(type, exc, self._tb)
File "/usr/lib/python3.4/site-packages/setuptools/compat.py", line 69, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 239, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 269, in run
return func()
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 238, in runner
_execfile(setup_script, ns)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-gv5il123/numpy-1.14.1/setup.py", line 394, in <module>
File "/tmp/easy_install-gv5il123/numpy-1.14.1/setup.py", line 386, in setup_package
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/core.py", line 169, in setup
File "/usr/lib64/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.4/site-packages/setuptools/command/bdist_egg.py", line 151, in run
self.run_command("egg_info")
File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/egg_info.py", line 26, in run
File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 148, in run
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 165, in build_sources
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 324, in build_extension_sources
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 377, in generate_sources
File "numpy/core/setup.py", line 422, in generate_config_h
return tag
File "numpy/core/setup.py", line 48, in check_types
min_numpy_ver = '1.9.0'
File "numpy/core/setup.py", line 281, in check_types
pjoin(ujson_lib,'ultrajsondec.c'),
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
/tmp/easy_install-gv5il123/numpy-1.14.1/temp/tmpsx06jzi5/source.c:1:19: fatal error: cblas.h: No such file or directory
#include <cblas.h>
^
compilation terminated.
/tmp/easy_install-gv5il123/numpy-1.14.1/temp/tmpsx06jzi5/source.c:1:19: fatal error: cblas.h: No such file or directory
#include <cblas.h>
^
compilation terminated.
non-existing path in 'numpy/distutils': 'site.cfg'
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’
int exp (void);
^~~
_configtest.o: In function `main':
/tmp/easy_install-gv5il123/numpy-1.14.1/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status
_configtest.o: In function `main':
/tmp/easy_install-gv5il123/numpy-1.14.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’
int exp (void);
^~~
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
/tmp/pip-build-xqyfs1o1/pandas/
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
You are missing the packages python-dev and python-devel.
But since you are not root on that server you probably cannot install them yourself. Basically you could ask the administrator if he could install them for you.
I would recommend installing a local version of Python and install the packages there.
By the way: Since you are not root pip would fail anyways since you probably do not have the right to globally install packages. You should use pip install <package> --user instead.
I am using Ubuntu 14.04 with Python version 2.7.6. I recently installed Python version 3.4.2 side-by-side with the system Python using pyenv. Now I would like to test out some debuggers for Python 3, and I downloaded trepan-0.2.8-py3.3.egg from the python3-trepan project page.
Then I ran pyenv global 3.4.2 and easy_install trepan-0.2.8-py3.3.egg, which gave me the following error:
Traceback (most recent call last):
File "/home/hakon/.pyenv/versions/3.4.2/bin/easy_install", line 11, in <module>
sys.exit(main())
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1909, in main
with_ei_usage(lambda:
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1896, in with_ei_usage
return f()
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1913, in <lambda>
distclass=DistributionWithoutHelpCommands, **kw
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 358, in run
self.easy_install(spec, not self.no_deps)
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 574, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 625, in install_item
self.process_distribution(spec, dist, deps)
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 671, in process_distribution
[requirement], self.local_index, self.easy_install
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/pkg_resources.py", line 564, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/pkg_resources.py", line 802, in best_match
return self.obtain(req, installer) # try and download/install
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/pkg_resources.py", line 814, in obtain
return installer(requirement)
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 593, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 623, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 809, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1015, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1000, in run_setup
run_setup(setup_script, args)
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/sandbox.py", line 50, in run_setup
lambda: execfile(
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/sandbox.py", line 100, in run
return func()
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/sandbox.py", line 52, in <lambda>
{'__file__':setup_script, '__name__':'__main__'}
File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/compat.py", line 78, in execfile
exec(compile(source, fn, 'exec'), globs, locs)
File "setup.py", line 12, in <module>
ImportError: No module named '__pkginfo__'
Update:
The problem seems not to be related to installing Python 3 using pyenv: I tried the following:
disabled pyenv
sudo apt-get install python3 python
sudo apt-get install python3-setuptools
sudo easy_install-3.4 trepan-0.2.8-py3.3.egg
This gave me the same error:
Traceback (most recent call last):
File "/usr/bin/easy_install-3.4", line 9, in <module>
load_entry_point('setuptools==3.3', 'console_scripts', 'easy_install-3.4')()
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1963, in main
with_ei_usage(lambda:
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1950, in with_ei_usage
return f()
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1967, in <lambda>
distclass=DistributionWithoutHelpCommands, **kw
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/lib/python3/dist-packages/setuptools/command/easy_install.py", line 381, in run
self.easy_install(spec, not self.no_deps)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 597, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 648, in install_item
self.process_distribution(spec, dist, deps)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 694, in process_distribution
[requirement], self.local_index, self.easy_install
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 620, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 858, in best_match
return self.obtain(req, installer) # try and download/install
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 870, in obtain
return installer(requirement)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 616, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 646, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 834, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1040, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1025, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 50, in run_setup
lambda: execfile(
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 100, in run
return func()
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 52, in <lambda>
{'__file__':setup_script, '__name__':'__main__'}
File "/usr/lib/python3/dist-packages/setuptools/compat.py", line 78, in execfile
exec(compile(source, fn, 'exec'), globs, locs)
File "setup.py", line 12, in <module>
ImportError: No module named '__pkginfo__'
Starting with trepan 0.4.2 (at this writing we are at 0.4.7), the pip problems were addressed. However...
You are using pyenv but note that on Ubuntu 14.04 without that, you may need to use pip3 instead of pip. Outside of pyenv I think defaults pip to Python2's pip. See also this link.
And alas, there is another weirdness. When a wheel is not available (as was the case before version 0.4.7), pip uses the source tarball to install from rather than an egg. However the source code for Python 2 versus Python 3 is necessarily different and it would be too difficult to try to combine these into one source.
So, I have started to put wheel format file on pypi.org and I hope this too will address problems like this in the future.
I haven't tested it, but the maintainer #rocky recommends this to install:
pip3 install trepan3k
OLD:
Install using this command:
pip3 install -e git+https://github.com/rocky/python3-trepan/#egg=trepan
I think the current tarball/eggs are broken
You might take a look at https://askubuntu.com/questions/95037/what-is-the-best-way-to-install-python-packages or https://askubuntu.com/questions/350437/installing-python-modules-on-ubuntu or Installing python modules on Ubuntu
This just might solve the problem. Hope it helps.
I'm trying to install unittest2 for Cygwin. I expect I'm missing something relatively simple, but I don't know what it is.
$ easy_install --version
distribute 0.6.34
$ python --version
Python 3.2.5
When I try to easy_install unittest2, I get the following output:
$ easy_install -U unittest2
Searching for unittest2
Reading http://pypi.python.org/simple/unittest2/
Best match: unittest2 0.5.1
Downloading https://pypi.python.org/packages/source/u/unittest2/unittest2-0.5.1.zip#md5=1527fb89e38343945af1166342d851ee
Processing unittest2-0.5.1.zip
Writing /tmp/easy_install-ncoq7f/unittest2-0.5.1/setup.cfg
Running unittest2-0.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ncoq7f/unittest2-0.5.1/egg-dist-tmp-ecnv6z
Traceback (most recent call last):
File "/usr/bin/easy_install", line 9, in <module>
load_entry_point('distribute==0.6.34', 'console_scripts', 'easy_install')()
File "/usr/lib/python3.2/site-packages/setuptools/command/easy_install.py", line 1937, in main
with_ei_usage(lambda:
File "/usr/lib/python3.2/site-packages/setuptools/command/easy_install.py", line 1918, in with_ei_usage
return f()
File "/usr/lib/python3.2/site-packages/setuptools/command/easy_install.py", line 1941, in <lambda>
distclass=DistributionWithoutHelpCommands, **kw
File "/usr/lib/python3.2/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.2/distutils/dist.py", line 917, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.2/distutils/dist.py", line 936, in run_command
cmd_obj.run()
File "/usr/lib/python3.2/site-packages/setuptools/command/easy_install.py", line 358, in run
self.easy_install(spec, not self.no_deps)
File "/usr/lib/python3.2/site-packages/setuptools/command/easy_install.py", line 598, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python3.2/site-packages/setuptools/command/easy_install.py", line 628, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python3.2/site-packages/setuptools/command/easy_install.py", line 823, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python3.2/site-packages/setuptools/command/easy_install.py", line 1103, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python3.2/site-packages/setuptools/command/easy_install.py", line 1089, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python3.2/site-packages/setuptools/sandbox.py", line 34, in run_setup
lambda: exec(compile(open(
File "/usr/lib/python3.2/site-packages/setuptools/sandbox.py", line 82, in run
return func()
File "/usr/lib/python3.2/site-packages/setuptools/sandbox.py", line 37, in <lambda>
{'__file__':setup_script, '__name__':'__main__'})
File "setup.py", line 12, in <module>
File "/tmp/easy_install-ncoq7f/unittest2-0.5.1/unittest2/__init__.py", line 40, in <module>
File "/tmp/easy_install-ncoq7f/unittest2-0.5.1/unittest2/collector.py", line 3, in <module>
File "/tmp/easy_install-ncoq7f/unittest2-0.5.1/unittest2/loader.py", line 92
except Exception, e:
^
SyntaxError: invalid syntax
What's going on?
Try easy_install unittest2py3k (https://pypi.python.org/pypi/unittest2py3k). The error you are receiving is due to a change in syntax between in Python 3 (http://docs.pythonsprints.com/python3_porting/py-porting.html#exceptions)
I m trying to install pgmagick library on windows. I m following the official page:
http://pypi.python.org/pypi/pgmagick/
From there i can notice that i need to install first easy_install,pip, boost and graphicsMagic.
In this page i found easy_install:
http://blog.troygrosfield.com/2010/12/18/installing-easy_install-and-pip-for-python/
In this page i can find pip and boost:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pgmagick
But i can't figure out how to install magick++. I went to website and download it but it installs just the software and when i try to install pgmagick like this:
pip install pgmagick
there is an error that i need magick++:
F:\Python27\Scripts>easy_install -ZU pgmagick
Searching for pgmagick
Reading http://pypi.python.org/simple/pgmagick/
Reading http://bitbucket.org/hhatto/pgmagick
Best match: pgmagick 0.5.4
Downloading http://pypi.python.org/packages/source/p/pgmagick/pgmagick-0.5.4.tar
.gz#md5=c10a454331ac1c359b39e50663fd28e4
Processing pgmagick-0.5.4.tar.gz
Running pgmagick-0.5.4\setup.py -q bdist_egg --dist-dir f:\docume~1\alessa~1\imp
ost~1\temp\easy_install-xaypdo\pgmagick-0.5.4\egg-dist-tmp-qu7mji
Traceback (most recent call last):
File "F:\Python27\Scripts\easy_install-script.py", line 8, in <module>
load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
File "F:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
1712, in main
with_ei_usage(lambda:
File "F:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
1700, in with_ei_usage
return f()
File "F:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
1716, in <lambda>
distclass=DistributionWithoutHelpCommands, **kw
File "F:\Python27\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "F:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "F:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "F:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
211, in run
self.easy_install(spec, not self.no_deps)
File "F:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
446, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "F:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
476, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "F:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
655, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "F:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
930, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "F:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
919, in run_setup
run_setup(setup_script, args)
File "F:\Python27\lib\site-packages\setuptools\sandbox.py", line 62, in run_se
tup
lambda: execfile(
File "F:\Python27\lib\site-packages\setuptools\sandbox.py", line 105, in run
return func()
File "F:\Python27\lib\site-packages\setuptools\sandbox.py", line 64, in <lambd
a>
{'__file__':setup_script, '__name__':'__main__'}
File "setup.py", line 74, in <module>
Exception: Magick++ not found
thanks!
I recommend you use the precompiled binary packages from the Unofficial Windows Binaries for Python Extension Packages (as mentioned in the pgmagick web page), instead of trying to compile from source which will be quite a complicated process.