11Installing Pelican
22##################
33
4- Pelican currently runs best on |min_python |; earlier versions of Python are not supported.
4+ Pelican currently runs best on Python |min_python |; earlier versions of Python are not supported.
55
66Once Pelican is installed, you can run ``pelican --help `` to see basic usage
77options. For more detail, refer to the :doc: `Publish<publish> ` section.
88
9- You can install Pelican via several different methods. The simplest is via
10- `pip <http://www.pip-installer.org/ >`_::
9+ You can install Pelican via several different methods.
1110
12- python -m pip install pelican
11+ ** Recommended method: ** ` Pip < https:// pip.pypa.io/ >`_ User Install
1312
14- Keep in mind that operating systems will often require you to prefix the above
15- command with ``sudo `` in order to install Pelican system-wide. **You should
16- not do this ** as it may break your operating system. In this case you
17- can add the ``--user `` flag or try one of the recommended methods below.
13+ To install Pelican via Pip::
1814
19- ** Recommended method 1: ** ` pipx < https://github.com/pipxproject/pipx/ >`_
15+ python3 -m pip install --user "pelican[markdown]"
2016
21- pipx lets you execute binaries from Python packages in isolated environments.
22- You can install pipx according to instructions on its
23- `homepage <https://github.com/pipxproject/pipx/ >`_. After pipx is installed,
24- you can install pelican::
17+ Or, if you do not plan to use `Markdown <https://pypi.org/project/Markdown/ >`_,
18+ you can omit the ``[markdown] `` suffix::
2519
26- $ pipx install pelican
27- installed package pelican 4.0.1, Python 3.6.7
28- These binaries are now globally available
29- - pelican
30- - pelican-import
31- - pelican-quickstart
32- - pelican-themes
33- done! ✨ 🌟 ✨
20+ python3 -m pip install --user pelican
3421
35- To upgrade or uninstall::
22+ ** Alternate method 1: ** ` Pipx < https://github.com/pypa/pipx >`_
3623
37- pipx upgrade pelican
38- pipx uninstall pelican
24+ Pipx lets you execute binaries from Python packages in isolated environments.
25+ You can install Pipx by following its
26+ `documentation <https://pipx.pypa.io >`_. After Pipx is installed,
27+ you can install Pelican via::
28+
29+ pipx install "pelican[markdown]"
30+
31+ **Alternate method 2: ** `uv <https://docs.astral.sh/uv/ >`_
32+
33+ Like Pipx, ``uv `` allows you to install tools in isolated environments.
34+ If you have ``uv `` installed, you can install Pelican via::
35+
36+ uv tool install "pelican[markdown]"
3937
40- **Recommended method 2 : ** Virtual Environment
38+ **Alternate method 3 : ** Virtual Environment
4139
42- If you prefer to manually manage a Virtual Environment, you can create
43- a virtual environment for Pelican via venv _ (or virtualenv _ if you are
44- using Python2) before installing Pelican.::
40+ If you prefer to manually manage a virtual environment, you can create
41+ a virtual environment for Pelican via venv _ before installing Pelican::
4542
46- python -m venv ~/virtualenvs/pelican
47- . ~/virtualenvs/pelican/bin/activate
43+ python3 -m venv ~/virtualenvs/pelican
44+ source ~/virtualenvs/pelican/bin/activate
45+ python3 -m pip install "pelican[markdown]"
4846
49- Once the virtual environment has been created and activated, Pelican can be
50- installed via ``python -m pip install pelican `` as noted above. Alternatively, if you
51- have the project source, you can install Pelican using the setuptools method::
47+ Alternatively, if you have the project source, you can replace the last command
48+ with the following to install Pelican using the ``setuptools `` method::
5249
5350 cd path-to-Pelican-source
54- python -m pip install .
51+ python3 -m pip install .
5552
5653If you have Git installed and prefer to install the latest bleeding-edge
5754version of Pelican rather than a stable release, use the following command::
5855
59- python -m pip install -e "git+https://github.com/getpelican/pelican.git#egg=pelican"
56+ python3 -m pip install -e "git+https://github.com/getpelican/pelican.git#egg=pelican"
6057
6158To exit the virtual environment, type ``deactivate ``.
6259
@@ -66,18 +63,23 @@ Optional packages
6663If you plan on using `Markdown <https://pypi.org/project/Markdown/ >`_ as a
6764markup format, you can install Pelican with Markdown support::
6865
69- python -m pip install "pelican[markdown]"
66+ python3 -m pip install --user "pelican[markdown]"
7067
7168Typographical enhancements can be enabled in your settings file, but first the
72- requisite `Typogrify <https://pypi.org/project /typogrify/ >`_ library must be
69+ requisite `Typogrify <https://github.com/justinmayer /typogrify >`_ library must be
7370installed::
7471
75- python -m pip install typogrify
72+ python3 -m pip install --user typogrify
7673
77- If you are using pipx , you can inject packages into the pipx -managed virtual
78- environment::
74+ If you are using Pipx , you can inject packages into the Pipx -managed virtual
75+ environment. For example, to add Typogrify ::
7976
80- pipx inject pelican Markdown
77+ pipx inject pelican typogrify
78+
79+ To use ``uv `` to install Pelican with additional extra packages, use the
80+ following example command, which will install both Markdown & Typogrify::
81+
82+ uv tool install --with Markdown --with typogrify pelican
8183
8284Dependencies
8385------------
@@ -107,15 +109,19 @@ Upgrading
107109If you installed a stable Pelican release via Pip _ and wish to upgrade to
108110the latest stable release, you can do so by adding ``--upgrade ``::
109111
110- python -m pip install --upgrade pelican
112+ python3 -m pip install --upgrade pelican
111113
112- If you installed Pelican via distutils or the bleeding-edge method, simply
114+ If you installed Pelican via `` setuptools `` or the bleeding-edge method,
113115perform the same step to install the most recent version.
114116
115- If you installed with pipx ::
117+ If you installed with Pipx, upgrade via ::
116118
117119 pipx upgrade pelican
118120
121+ If you installed with ``uv ``, upgrade via::
122+
123+ uv tool upgrade pelican
124+
119125Kickstart your site
120126-------------------
121127
0 commit comments