make cpplint stopped working with Anaconda?

26 views
Skip to first unread message

Bob Carpenter

unread,
Jun 10, 2016, 9:48:13 PM6/10/16
to stan...@googlegroups.com
I installed Python 3 through Anaconda so I could
run Jupyter and then the make cpplint stopped working.
The help file for make says that cpplint requires Python 2.7.
Does that mean it won't run with Python 3?

It looks that way, because I now get errors when trying to
run cpplint:


~/cmdstan/stan(bugfix/issue-1909-vector0)$ make cpplint
make: *** [cpplint] Error 1


Here's what Python looks like now after Anaconda:


~/cmdstan/stan(bugfix/issue-1909-vector0)$ python --version
Python 3.5.1 :: Anaconda 4.0.0 (x86_64)

~/cmdstan/stan(bugfix/issue-1909-vector0)$ which python
/Users/carp/anaconda/bin/python


Any idea what happened or how to fix it? Can I somehow configure
python for our make purposes to be the old one?

For now, I'm just going to use Jenkins to run my cpplint
for me, so there'll probably be an initial failure.

- Bob


Daniel Lee

unread,
Jun 12, 2016, 11:35:03 AM6/12/16
to stan-dev mailing list
Hi Bob,

I just checked the latest version of cpplint; it's still not compatible with Python 3.

I did add the ability to change how cpplint is run with a make variable, but I made it pretty difficult. I'm going to create a pull request to make it easier to just specify the python version.

To do it now, from within the math library, you can do something like:
make cpplint RUN_CPPLINT="python2.7 lib/cpplint_4.45/cpplint.py"

You could also go into your ~/.config/stan/make.local and add:
RUN_CPPLINT="python2.7 <path to cpplint.py>"


I'm opening up an issue / pull request on the math library to set the python2 version. So it'll be:
make cpplint PYTHON2=python2.7



Daniel




- Bob


--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages