On 20/07/23 04:47, Eric Altendorf wrote:
the installation instructions are a bit confused and misleading with some out-of-date v2 instructions and some incomplete and out-of-date v3 instructions (as came up earlier in the thread).

The instructions to install the latest development version of beancount do not exist, because they are the same as for any other Python package that does not have wheels released on PyPI, and they are very easy:

pip install git+https://github.com/beancount/beancount.git

Replace "beancount.git" with "beangulp.git" or "beanquery.git" for getting the other components you may need.

Because beancount v3 is still in development, I assumed that all interested in installing it would have a minimal knowledge of Python package development, and if they do, that is the first command they would try to install the package. As nothing special is required, I felt that no special instruction are needed.

On linux, roughly:
1) git clone the repos you want (beancount, beangulp, ...)
2) create a virtual environment to have an isolated and disposable beancount install/config 3) in the venv, `python3 -m pip install -r beancount/requirements/dev.txt -e beancount/ -e beangulp/`

This gives you editable installs of the packages. While it should not have any downsides (other than you need to keep the source trees around, or things will stop working) I would not recommend it for users that don't want to work on the code of these packages.

Possibly you may need to run `make` in the beancount/ dir; I'm not sure.

You don't need to run make.

 Martin said you don't need Bazel, at least on linux.  On windows I'm not sure because I have no idea how C++ build tools work on windows.

There are no C++ components used yet. Bazel is used only to build the experimental components in C++, but these are not used anywere yet.

Plan on running (2) and (3) again in the future if you ever need to install other python modules; pip gets easily confused and can work your install packages into a wonky state that is difficult to back out of, easier to just wipe and reinstall everything with one run of pip with all packages at once.  (For example, if later you try to install Fava, pip will helpfully silently install beancount v2 in an attempt to meet the Fava compatibility requirements, and you'll end up with a random mix of v3 and v2, mostly v2.  You only get a compatibility error if you try to install beancount v3 and fava in the same pip invocation.)

OTOH I'm not sure if v3 offers major user-facing upgrades at this point.  v3 sounds like it's mostly about internal reworking.

In v3 some components (beancount.query, beancount.ingest, bean-price) have been moved out of the core application into their own projects (beanquery, beangulp, beanprice). The first two have seen major updates compared to the version contained in beancount v2. However, you can use these also with beancount v2.

 Unless there's a specific capability v3 offers you, or you want to contribute to code development, I think v2 might be fine.  Just don't try to follow the instructions for installing the "dev" version of v2, it describes how to build v2 but since the repo head is now v3 your git clone will get v3 code (at least I think that's what happened to me on my first attempt at installing).

If you want the source code for beancount v2 just checkout the v2 branch. However, the development instructions for v2 and v3 should be identical (despite they deviate from what are modern python packaging practices and follow Martin's workflow), so I'm surprised you ran into issues.

HTH, in another life I'm messing with PyTorch and LLMs and there I'm in a hellscape of pip-installed packages, conda-installed packages, and apt-installed Cuda libraries, it's total chaos.  Apt is OK, but Python package management is ... unpleasant.

Don't try to mix conda-installed and pip-installed packages. It works in simple cases but it is likely to cause issue. I mean, it is written clearly in the conda documentation that you should not do it...

Cheers,
Dan

--
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/2a323ab1-41fd-e522-64a0-2c5e0e0f66bf%40grinta.net.

Reply via email to