0

I followed the procedure given on the Pelican website by:

  1. Creating a virtualenv and then source bin/activate
  2. Installing pelican using pip install pelican
  3. Writing pelican-quickstart

When I typed in pelican-quickstart, I got the following error:

Traceback (most recent call last):
  File "/home/ashutosh_mishra/virtualenvs/pelican/bin/pelican-quickstart", line 7, in <module>
    from pelican.tools.pelican_quickstart import main
  File "/home/ashutosh_mishra/virtualenvs/pelican/lib/python3.2/site-packages/pelican/__init__.py", line 19, in <module>
    from pelican.generators import (ArticlesGenerator, PagesGenerator,
  File "/home/ashutosh_mishra/virtualenvs/pelican/lib/python3.2/site-packages/pelican/generators.py", line 14, in <module>
    from jinja2 import (BaseLoader, ChoiceLoader, Environment, FileSystemLoader,
  File "/home/ashutosh_mishra/virtualenvs/pelican/lib/python3.2/site-packages/jinja2/__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "/home/ashutosh_mishra/virtualenvs/pelican/lib/python3.2/site-packages/jinja2/environment.py", line 677
    u'\xff\xff\xff\xff'.encode('iso-8859-15')
                      ^
SyntaxError: invalid syntax

I googled the error and found Pelican 3.3 pelican-quickstart error "ValueError: unknown locale: UTF-8"', but this doesn't solve my problem.

Can anyone suggest a solution?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Surbhi Misra
  • 39
  • 1
  • 6

1 Answers1

1

While the error traceback points to an issue with Jinja2 and not Pelican directly, the most likely cause is Python 3.2 — that version of Python is rather old and is no longer supported by either the Jinja2 or Pelican development teams.

Upgrading your operating system may allow your package manager to install a more recent Python version (3.4+ recommended). Alternatively, you can use a tool such as PyEnv to install the latest version of Python without having to upgrade your operating system.

Justin Mayer
  • 2,063
  • 11
  • 15