Metropolis
Metropolis

Reputation: 2128

Spacemacs python layer: Invalid version syntax

When I attempt to start Spacemacs with the Python layer enabled, I see a warning:

Error (use-package): python :init: Invalid version syntax: '[?1034h4.0.0'

Restarting emacs using --debug-init shows:

Debugger entered--Lisp error: (error "Invalid version syntax: '[?1034h4.0.0'")
  signal(error ("Invalid version syntax: '[?1034h4.0.0'"))
  error("Invalid version syntax: '%s'" "[?1034h4.0.0")
  version-to-list("[?1034h4.0.0")
  version<("[?1034h4.0.0" "5")`

Plus a lot more.

When I comment out the python layer from dotspacemacs-configuration-layers in the .spacemacs file, the error goes away (but, of course, no Python layer is enabled).

Any clues as to how to debug this would be appreciated.

This is running on OS X 10.12.2 With GNU Emacs 24.5.1 and Spacemacs v.0.200.7

And running (executable-find "ipython") results in /Users/xxx/anaconda/bin/ipython Same executable for python

Upvotes: 1

Views: 1490

Answers (1)

Metropolis
Metropolis

Reputation: 2128

I posted this question also (more appropriately) on emacs.stackechange. For completeness, I'm answering it here as well.

The lesson here is to take care with your system Python installation.

I had conflicting Python version installed alternately via brew and from Anaconda.

To resolve this I had to

/usr/local/bin/pip2 uninstall flake8

And then reinstall with

pip install flake8

which uses /Users/xxx/anaconda/bin/pip which is the pip/python installation that emacs attempts to use. Gnarly.

Upvotes: 1

Related Questions