installation on M1

385 views
Skip to first unread message

david e

unread,
Feb 16, 2022, 10:51:00 AM2/16/22
to Beancount
I am on a new device and want to give beancount another try to keep this years finances in order. I am on a m1 air.

yesterday I installed beancount v2 from docs and did a quick check with 'bean-check' returning no error – fine.

today I get 'bean-check: command not found', so the installation doesn't seem to be permanent.

error message:

WARNING: The directory '/Users/de/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Requirement already satisfied: beancount in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (3.0.0.dev0)
Requirement already satisfied: python-dateutil in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from beancount) (2.8.2)
Requirement already satisfied: ply in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from beancount) (3.11)
Requirement already satisfied: click in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from beancount) (8.0.3)
Requirement already satisfied: six>=1.5 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from python-dateutil->beancount) (1.16.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

any ideas? thanks

Tuno Tunante

unread,
Feb 16, 2022, 12:32:11 PM2/16/22
to Beancount
Hi,

Recently I installed a new beancount in my new M1 and I found some problems... Probably is not solution for your problem but could give you some hints...

I started installing python with brew. I didn't realise that there is another python3 in the /usr/bin/ directory that comes from the OS... Nothing was working well... Missing libraries, estranges errors, etc.

Another problem, I discovered with VS Code and the Lencerf extension. Was not working because brew now install everything in /opt/homebrew/bin when the mac is an M1 instead of /usr/local/bin  before.
So, the solution was, uninstall everything and install beancount, fava, etc. from pip3. 

Tino.


--
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 beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/1a857ad8-f45a-40a8-8a0d-f3fb2636326an%40googlegroups.com.

Daniele Nicolodi

unread,
Feb 16, 2022, 3:22:38 PM2/16/22
to bean...@googlegroups.com
The provided information is not really enough to help you. I don't see
what is the relation between the "command not found" shell error and the
pip warning message below.

However, this seems a general problem of installing Python packages on
macOS, apparently with the stock Python provided by the OS. It is
unlikely to be an issue related to the architecture, more probably it is
related to the OS version. Asking for guidance on a Python users support
channel may be more appropriate.

I don't have any device running macOS 11, thus providing detailed
guidance is very difficult. However, if someone wants to send a M1
machine this direction, I would be more than happy to help sort out any
issue related to running Beancount on one such machine :)

Cheers,
Dan

david e

unread,
Feb 17, 2022, 1:48:25 AM2/17/22
to Beancount
thank you, yes that's right. the provided error message belongs to the second attempt to re-install after running sudo pip3 install .

I will follow the ideas provided above and see if I manage to get things going.

Alan H

unread,
Feb 17, 2022, 2:40:55 PM2/17/22
to Beancount
I have been running beancount a few years - I'm no expert but I do use it regularly for personal and company finances.

I recently upgraded to an M1 Air and had almost no trouble at all with porting my environment to the new machine (at least the beancount part of things).

What is different for me? Or how does this work for me? I make extensive use of `pyenv` to install and maintain python installations per project. I have a bean python install that only contains the pip packages that I need for my beancounting.

I find that this approach leads to happiness when doing python things. (I leave the system install alone and let the system use it.)

As you mentioned homebrew; I'll chime in that this is what I use. My bootstrapping for the M1 was something like (psuedo code)

  1. git clone MY_PERSONAL_PRIVATE_BC_REPO  (or otherwise make the files appear)
  2. install XCode command line tools - double check that xcrun is in your path
  3. run my bootstrap script which you can find here
  4. (note it also calls first-step.sh -- you can find that here)
  5. Happiness.

You will note that these scripts also build and install python 3.9.9 as a virtualenv and then install beancount via pip-tools.
Once you setup the pyenv virtualenv (and activate it with pyenv activate bean) you can just install beancount and fava by hand. 
I will note that I build fava too - since I sometimes hack on it a little bit. If you install from pipy you likely don't need the script that deals with building it.

The minimum contents for requirements.in is likely:

beancount<3
fava

Hope this helps happily from an M1,
Alan
Reply all
Reply to author
Forward
0 new messages