Skip to content

Commit 5914182

Browse files
committed
Added documentation on setting up pyenv and local venv
1 parent 7ba7be7 commit 5914182

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

.python-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10.12

docs/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Welcome to ANGEL System's documentation!
1212

1313
algorithms/index
1414
system/index
15+
local_python_env
1516
python_tpl
1617

1718

docs/local_python_env.rst

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
=====================================
2+
Setting up a Local Python Environment
3+
=====================================
4+
5+
Setting up ``pyenv``
6+
====================
7+
``pyenv`` is a tool to locally install various python versions separably
8+
GitHub page is `here <https://github.com/pyenv/pyenv>`_ which includes
9+
reference to the automatic installer script in `this section
10+
<https://github.com/pyenv/pyenv#automatic-installer>`_.
11+
The script that is downloaded and run can be viewed by following the links in
12+
your browser if you would like to vet what is to be run on your system (a
13+
recommended practice).
14+
15+
The following are additional packages to install on your host system to enable
16+
building a fully capable Python installation.
17+
The package names are in the form that would be found via the Ubuntu package
18+
manager.
19+
20+
* ``libbz2-dev``
21+
22+
* ``libreadline-dev``
23+
24+
* ``tk-dev``
25+
26+
Creating Poetry-based Environment
27+
=================================
28+
A ``.python-version`` is present in the root of this repository that specifies
29+
the python version that should be run by ``pyenv`` shims when within this
30+
project's repository.
31+
This version should be installed with ``pyenv`` so that we can install our
32+
python dependencies locally in the next step.
33+
Navigate to the root of this repository and run:
34+
35+
.. prompt::
36+
37+
pyenv install $(cat .python-version)
38+
39+
With the python version successfully installed and available via ``pyenv``, we
40+
can now create our python virtualenv via Poetry:
41+
42+
.. prompt::
43+
44+
poetry install

0 commit comments

Comments
 (0)