1

My goal is to use Arelle (open-source platform for XBRL community) to parse XBRL docs from the SEC.

I am following instructions found here.

I successfully git cloned Arelle's code into the Lib directory of Anaconda. However, when I try from arelle import Cntlr I get the following syntax error.

File "arelle\Cntlr.py", line 573 print(logEntry, file=file) ^ SyntaxError: invalid syntax

I am using Python 2.7.12. in Anaconda.

Any feedback is appreciated and I can provide further information upon request.

p_sutherland
  • 471
  • 1
  • 11
  • 21

1 Answers1

3

The instructions you found are rather old (from 2014), and appear to be outdated.

I was able to install the package with the following steps:

# This is needed because the 3to2 library can't be installed as an egg; if
# you don't install it with `pip` first the installation of Arelle will fail.
$ pip install 3to2
# Install Arelle directly from GitHub, this will take a while
$ pip install git+https://github.com/Arelle/Arelle

With 3to2 installed, the installation script setup.py proceeds to translate the Arelle sourcecode back to a Python 2 compatible form. Translation takes several minutes, be patient.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
  • When I used the pip install I got ``error: option --single-version-externally-managed not recognized``. But git clone worked perfectly. Really appreciate your guidance @Martijn Pieters. – p_sutherland Dec 13 '16 at 14:23
  • 1
    @p_sutherland: sounds like you have an older `setuptools` version installed somewhere. Use `pip install -U setuptools` to clear that error (I think, see [What does "error: option --single-version-externally-managed not recognized" indicate?](//stackoverflow.com/q/14296531)). – Martijn Pieters Dec 13 '16 at 15:51