Closed sjose1x closed 8 years ago
I don't use Python 2, but as far as I know, 3to2
must be installed beforehand. Only then can you install language-check
. Otherwise, setup.py
won't have access to 3to2
.
$ pip install 3to2
$ pip install language-check
As far as I know, this is just how 3to2 works. Below is an example from another (unrelated) project.
(python2.7)
$ pip install git+https://github.com/JelteF/PyLaTeX
Collecting git+https://github.com/JelteF/PyLaTeX
Cloning https://github.com/JelteF/PyLaTeX to /var/folders/np/bmcfccrd3996nvvrxrht818r0000gn/T/pip-G9pmSi-build
Complete output from command python setup.py egg_info:
/var/folders/np/bmcfccrd3996nvvrxrht818r0000gn/T/pip-G9pmSi-build/setup.py:74: SyntaxWarning: name 'PY2_CONVERTED' is used prior to global declaration
global PY2_CONVERTED
running egg_info
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/var/folders/np/bmcfccrd3996nvvrxrht818r0000gn/T/pip-G9pmSi-build/setup.py", line 111, in <module>
'Topic :: Text Processing :: Markup :: LaTeX',
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 970, in run_command
cmd_obj = self.get_command_obj(command)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 846, in get_command_obj
cmd_obj = self.command_obj[command] = klass(self)
File "/private/tmp/PyLaTeX/py/lib/python2.7/site-packages/setuptools/__init__.py", line 127, in __init__
_Command.__init__(self,dist)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 64, in __init__
self.initialize_options()
File "/var/folders/np/bmcfccrd3996nvvrxrht818r0000gn/T/pip-G9pmSi-build/setup.py", line 52, in initialize_options
convert_to_py2()
File "/var/folders/np/bmcfccrd3996nvvrxrht818r0000gn/T/pip-G9pmSi-build/setup.py", line 66, in convert_to_py2
raise ImportError('3to2 and future need to be installed '
ImportError: 3to2 and future need to be installed before installing when PyLaTeX for Python 2.7 when it is not installed using one of the pip releases.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /var/folders/np/bmcfccrd3996nvvrxrht818r0000gn/T/pip-G9pmSi-build
I suggest you report this upstream in the 3to2 issue tracker.
On a related note, I would be willing to merge a pull request that converts this code to be Python 2 compatible in addition to Python 3. This would remove the need for 3to2.
from setuptools import setup, find_packages setup( name='name', version='0.0.1', description=' TA', long_description=DESCRIPTION, license='Proprietary License', author='', author_email='', packages=find_packages(), install_requires=[ "language-check==0.7.1", "3to2==1.1.1", ],
python setup.py install #Fails