hltcoe / concrete-python

Python modules and scripts for working with Concrete, a data serialization format for NLP
https://concrete-python.readthedocs.io
Other
20 stars 8 forks source link

pip install concrete errors #6

Closed lwolfsonkin closed 8 years ago

lwolfsonkin commented 8 years ago

when I type:

pip install concrete

installation fails and I get the following error:

Collecting concrete
  Using cached concrete-4.11.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/_1/ddmvvk9d5s98d40mf9bx24d00000gp/T/pip-build-3mguujzo/concrete/setup.py", line 4, in <module>
        execfile('concrete/version.py')
    NameError: name 'execfile' is not defined

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/_1/ddmvvk9d5s98d40mf9bx24d00000gp/T/pip-build-3mguujzo/concrete/
charman commented 8 years ago

What version of Python are you using?

The execfile function is part of Python 2 but not part of Python 3, so I suspect you are using Python 3. Unfortunately, concrete-python currently only works with Python 2. concrete-python depends on Thrift 0.9.3, the most recent stable release of Thrift (https://pypi.python.org/pypi/thrift), and this version of Thrift is not compatible with Python 3.

lwolfsonkin commented 8 years ago

Ah that was a fluke I wasn't aware of. It seems python defaults to Python 2, although pip defaults to Python 3 for me. Calling pip2 explicitly fixed the issue. Thanks for the help!