JuanPotato / Legofy

Make images look as if they are made out of 1x1 LEGO blocks
MIT License
3.16k stars 189 forks source link

Legofy wont work #89

Closed christoga closed 8 years ago

christoga commented 9 years ago

I try to run setup.py but the system is ignoring me, Please fix

Here is my terminal :

$ python setup.py install
running install
Checking .pth file support in /Library/Python/2.7/site-packages/
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-31852.pth'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /Library/Python/2.7/site-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again.

$ legofy
Traceback (most recent call last):
  File "/usr/local/bin/legofy", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2793, in <module>
    working_set.require(__requires__)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 673, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 576, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pillow
ITCave commented 9 years ago

Install Pillow before installing legofy

tsuriga commented 9 years ago

@CasualBeer I think his problem is that setup is not installing Pillow for him like it should (not a problem with Legofy itself of course).

@christoga it's not a problem with legofy but like the error message suggests, access privileges in your system. You can try 'python setup.py install --user', see if that works. If not, search for something like "python setup.py install permission denied" and you should find an array of similar issues (as it could be not just one thing in particular if I'm right). Do let us know if you find a more specific reason as to why that is happening on your system or if you manage to solve it.

christoga commented 9 years ago

The result is here :

running install
running bdist_egg
running egg_info
creating legofy.egg-info
writing requirements to legofy.egg-info/requires.txt
writing legofy.egg-info/PKG-INFO
writing top-level names to legofy.egg-info/top_level.txt
writing dependency_links to legofy.egg-info/dependency_links.txt
writing entry points to legofy.egg-info/entry_points.txt
writing manifest file 'legofy.egg-info/SOURCES.txt'
reading manifest file 'legofy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'legofy.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.11-intel/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/legofy
copying legofy/__init__.py -> build/lib/legofy
copying legofy/cli.py -> build/lib/legofy
copying legofy/images2gif_py2.py -> build/lib/legofy
copying legofy/images2gif_py3.py -> build/lib/legofy
creating build/lib/legofy/assets
creating build/lib/legofy/assets/bricks
copying legofy/assets/bricks/1x1.png -> build/lib/legofy/assets/bricks
creating build/bdist.macosx-10.11-intel
creating build/bdist.macosx-10.11-intel/egg
creating build/bdist.macosx-10.11-intel/egg/legofy
copying build/lib/legofy/__init__.py -> build/bdist.macosx-10.11-intel/egg/legofy
creating build/bdist.macosx-10.11-intel/egg/legofy/assets
creating build/bdist.macosx-10.11-intel/egg/legofy/assets/bricks
copying build/lib/legofy/assets/bricks/1x1.png -> build/bdist.macosx-10.11-intel/egg/legofy/assets/bricks
copying build/lib/legofy/cli.py -> build/bdist.macosx-10.11-intel/egg/legofy
copying build/lib/legofy/images2gif_py2.py -> build/bdist.macosx-10.11-intel/egg/legofy
copying build/lib/legofy/images2gif_py3.py -> build/bdist.macosx-10.11-intel/egg/legofy
byte-compiling build/bdist.macosx-10.11-intel/egg/legofy/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.11-intel/egg/legofy/cli.py to cli.pyc
byte-compiling build/bdist.macosx-10.11-intel/egg/legofy/images2gif_py2.py to images2gif_py2.pyc
byte-compiling build/bdist.macosx-10.11-intel/egg/legofy/images2gif_py3.py to images2gif_py3.pyc
creating build/bdist.macosx-10.11-intel/egg/EGG-INFO
copying legofy.egg-info/PKG-INFO -> build/bdist.macosx-10.11-intel/egg/EGG-INFO
copying legofy.egg-info/SOURCES.txt -> build/bdist.macosx-10.11-intel/egg/EGG-INFO
copying legofy.egg-info/dependency_links.txt -> build/bdist.macosx-10.11-intel/egg/EGG-INFO
copying legofy.egg-info/entry_points.txt -> build/bdist.macosx-10.11-intel/egg/EGG-INFO
copying legofy.egg-info/requires.txt -> build/bdist.macosx-10.11-intel/egg/EGG-INFO
copying legofy.egg-info/top_level.txt -> build/bdist.macosx-10.11-intel/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
legofy.__init__: module references __file__
creating dist
creating 'dist/legofy-0.0.1-py2.7.egg' and adding 'build/bdist.macosx-10.11-intel/egg' to it
removing 'build/bdist.macosx-10.11-intel/egg' (and everything under it)
Processing legofy-0.0.1-py2.7.egg
creating /Users/andrechristoga/Library/Python/2.7/lib/python/site-packages/legofy-0.0.1-py2.7.egg
Extracting legofy-0.0.1-py2.7.egg to /Users/andrechristoga/Library/Python/2.7/lib/python/site-packages
Adding legofy 0.0.1 to easy-install.pth file
Installing legofy script to /Users/andrechristoga/Library/Python/2.7/bin

Installed /Users/andrechristoga/Library/Python/2.7/lib/python/site-packages/legofy-0.0.1-py2.7.egg
Processing dependencies for legofy==0.0.1
Searching for pillow
Reading https://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
Writing /var/folders/7h/5mxfbyt9359cz_0pv36s57f40000gn/T/easy_install-yiaatj/Pillow-3.0.0/setup.cfg
Running Pillow-3.0.0/setup.py -q bdist_egg --dist-dir /var/folders/7h/5mxfbyt9359cz_0pv36s57f40000gn/T/easy_install-yiaatj/Pillow-3.0.0/egg-dist-tmp-I5DDeI
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 366, in _handle_tasks
    debug('task handler got sentinel')
TypeError: 'NoneType' object is not callable
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 330, 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
Traceback (most recent call last):
  File "setup.py", line 27, in <module>
    tests_require=['nose'],
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/install.py", line 73, in run
    self.do_egg_install()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/install.py", line 101, in do_egg_install
    cmd.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 374, in run
    self.easy_install(spec, not self.no_deps)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 590, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 641, in install_item
    self.process_distribution(spec, dist, deps)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 687, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 568, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 806, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 818, in obtain
    return installer(requirement)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 609, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 639, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 825, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 1031, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 1016, in run_setup
    run_setup(setup_script, args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 69, in run_setup
    lambda: execfile(
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 120, in run
    return func()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 71, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 767, in <module>

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/bdist_egg.py", line 185, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/bdist_egg.py", line 171, in call_command
    self.run_command(cmdname)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/install_lib.py", line 20, in run
    self.build()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install_lib.py", line 111, in build
    self.run_command('build_ext')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 337, in run
    self.build_extensions()
  File "setup.py", line 515, in build_extensions

ValueError: --enable-jpeg requested but jpeg not found, aborting.
Andres-MacBook-Air:Legofy andrechristoga$ 

Still error :cry:

tsuriga commented 9 years ago

From Troubleshooting section in the readme: "ValueError: --enable-jpeg requested but jpeg not found, aborting. install libjpeg" (see the link in readme)

niroyb commented 9 years ago

There is actually a list of dependencies for PIL : http://pillow.readthedocs.org/en/3.0.x/installation.html#linux-installation This should probably go in the readme.

louh commented 9 years ago

I had the exact same situation (on Mac OSX, running Python 3). Installing Pillow first was the way to go. I followed the instructions here (http://pillow.readthedocs.org/en/3.0.x/installation.html#os-x-installation) to install dependencies via Homebrew and then Pillow.

One other note is that because I was on Python 3, and the command line for this is python3 instead of python, so I also needed to run install script like so:

python3 setup.py install
JuanPotato commented 8 years ago

added pillow docs to readme