I am installing hachoir-metadata from reference[3]. I have completed the following for the installation of hachoir-metadata:
conda create -n hachoir-metadata pip python=3.5
activate hachoir-metadat
pip install --upgrade hachoir-metadata
I am using the software versions below:
Python Version 3.5.5 Anaconda: 3.6.5
I get an error stating Command "python setup.py egg_info" failed with error code 1 in...\hachoir-metda which is shown below.
I have completed the following in attempt to fix the problem:
1)Installed setuptools
pip install --upgrade setuptools[1]
2)Installed ipykernel
conda create -n ipykernel pip python=3.5
activate ipykernel
pip install --upgrade ipykernel
Non of the above work. Firstly, when analyzing the error it is due to a syntax issue. Therefore, could the error be caused by the fact that the Python version is incompatible(i.e. hachoir-metadata uses an old version of python but this should not be the case right)?
What can be done to solve this issue?
1 https://github.com/facebook/prophet/issues/418
[2] http://ipython.readthedocs.io/en/stable/install/kernel_install.html
So this it what I discovered (NB: that I am new to python), hachoir metadata works with python 2 and can not work with python 3+.
There are a few options to address this:
1)Conversion of 2.x code to 3.x for pure Python is generally a straightforward mechanical translation. There's a program called 2to3 .
Step 1) open command prompt and open that folder in command prompt then
type python C:/Python35/Tools/Scripts/2to3.py -w yourfile name [1]
2)You can also Port codes from python 2 to python 3 [2]
3)I also found this,Hachoir3 is written for Python 3.3+, it uses the new yield from syntax.[3]
Lucky Us! Guess I'm going with option 3.
[1] https://docs.python.org/3.0/library/2to3.html
[2] https://docs.python.org/3/howto/pyporting.html
[3] http://pydoc.net/hachoir3/3.0a2/
[4] https://docs.python.org/3/howto/cporting.html#cporting-howto