-1

I have installed the Jupyter-book module in Python. On Windows 10, I run this command:

jupyter-book create mybookname

I get an syntax error, ending with this in the trace:

File "c:\users\steve\appdata\local\programs\python\python35\lib\site-packages\jupyter_book\build.py", line 92 f"{path_book}" ^ SyntaxError: invalid syntax

Any ideas of what the syntax error is here? This is Python 3.5.3.

way0utwest
  • 644
  • 1
  • 6
  • 8
  • 1
    My first guess is that you've imported a Python 3.8 package into an older Python interpreter. – Prune Mar 23 '20 at 20:56
  • Does this answer your question? [f-strings giving SyntaxError?](https://stackoverflow.com/questions/50401632/f-strings-giving-syntaxerror) – Jongware Mar 23 '20 at 21:09
  • The answers below have helped. I didn't realize I needed Python >=3.6. Upgrading has fixed things. – way0utwest Mar 23 '20 at 22:06

2 Answers2

2

f"{path_book}" -- this is f-string, only available since Python 3.6 Try to create your notebook with Python 3.6 or higher.

Oleg
  • 961
  • 8
  • 16
2

jupyter-book requires python >=3.6.

Check it here: https://pypi.org/project/jupyter-book/

Henrique Branco
  • 1,778
  • 1
  • 13
  • 40