https://pypi.org/project/pyleargist/
Unix Instructions: http://www.fftw.org/fftw3_doc/Installation-on-Unix.html
-
Download the archive here: https://pypi.org/project/pyleargist/#files
-
Replace the setup.py file with this snippet below which replaces occurrences of file() with open() for Python 3 compatibility.
from setuptools import setup from setuptools.extension import Extension from Cython.Distutils import build_ext import sys, os import numpy as np version = open('VERSION.txt').read().strip() setup(name='pyleargist', version=version, description="GIST Image descriptor for scene recognition", long_description=open('README.txt').read(), classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keywords=('image-processing computer-vision scene-recognition'), author='Olivier Grisel', author_email='olivier.grisel@ensta.org', url='http://www.bitbucket.org/ogrisel/pyleargist/src/tip/', license='PSL', package_dir={'': 'src'}, cmdclass = {"build_ext": build_ext}, ext_modules=[ Extension( 'leargist', [ 'lear_gist/standalone_image.c', 'lear_gist/gist.c', 'src/leargist.pyx', ], libraries=['m', 'fftw3f'], include_dirs=[np.get_include(), 'lear_gist',], extra_compile_args=['-DUSE_GIST', '-DSTANDALONE_GIST'], ), ], )
-
Run
python setup.py build
If this gives you the errorgcc exited with status 1
scroll up to see if theleargist.pxd
file is missing. If it is missing in thesrc
directory, download it from Bitbucket Once you do this, runpython setup.py build
again. Now this step should succeed. -
Run
sudo python setup.py install
. If you get an error for Cython.Distutils not being found, check whether you're using the right version of Python usingwhich python
. Alternatively, sometimes sudo picks up the wrong Python path, so give it the Python3 absolute path. For e.g.,
sudo /home/user/anaconda3/bin/python setup.py install
.
I installed successfully as your guide over 3 weeks ago. Then, I tried to install this module in another PC, but it always stuck at Step 3.
Due to lack of
leargist.pxd
file and the Bitbucket repo is closed before.I also tried to find this file in my first succeed install but there is no result, which make me sick whole this week.
I do look for the file than ever. If you keep the file, please release it.
Anyway, thank for your helpful guide 💯 .