Hi,
> I can run $ ./ledger --version and I'm getting "Ledger 3.3.2-20230330",
Posting the complete output of ./ledger --version is helpful as the
version info includes a note about Python support:
% ledger --version | head -2
Ledger 3.3.2-20230330, the command-line accounting tool
with support for gpg encrypted journals and with Python support
> which is great, but the python test, fails on "import ledger".
Seeing how you invoke Python, which version is run, and the actual
error message when "the python test fails on "import ledger" can be
insightful, e.g.:
% /usr/bin/python3
Python 3.9.6 (default, Nov 10 2023, 13:38:27)
[Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ledger
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'ledger'
Maybe you could do a complete clean build from within a shell started
with script(1) and reply to this mail with the output (ledger-build.log)
attached?
% script ledger-build.log
% ./acprep ....
% exit
Looking at the linked libraries of the ledger (ldd output) built on
your system I do not see any references to Python, which exist for me
on my machine (see below).
% otool -L $(which ledger)
~/.nix-profile/bin/ledger:
/nix/store/zm4a348a65ilcl35dg1sc5wmr98f0qnn-ledger-3.3.2/lib/libledger.3.dylib (compatibility version 3.0.0, current version 3.0.0)
/nix/store/3zkxk2nzf3b59fmdqi7s8fasl4asgx37-gpgme-1.23.0/lib/libgpgmepp.6.dylib (compatibility version 27.0.0, current version 27.0.0)
/nix/store/z0nnwdh4p692yvf3qgwgj3bn78w99q6y-python3-3.11.6/lib/libpython3.11.dylib (compatibility version 3.11.0, current version 3.11.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1)
/nix/store/3zkxk2nzf3b59fmdqi7s8fasl4asgx37-gpgme-1.23.0/lib/libgpgme.11.dylib (compatibility version 44.0.0, current version 44.0.0)
/nix/store/sc9h2pf31m4pqbnq9h5f5yj0ccgr1hb6-libassuan-2.5.6/lib/libassuan.0.dylib (compatibility version 9.0.0, current version 9.6.0)
/nix/store/l455b10bq8vri2gzgy7jk5fzjh6q24b8-mpfr-4.2.1/lib/libmpfr.6.dylib (compatibility version 9.0.0, current version 9.1.0)
/nix/store/1mlfpdjs99nhkin3gi2ns37vggkskkr4-gmp-with-cxx-6.3.0/lib/libgmp.10.dylib (compatibility version 16.0.0, current version 16.0.0)
/nix/store/4w0d6ly44x9mczv4s0x26dyhisgshb01-libedit-20221030-3.1/lib/libedit.0.dylib (compatibility version 1.0.0, current version 1.70.0)
/nix/store/rd912bdihq9azqhmx37p39yp05mv8vca-boost-1.81.0/lib/libboost_date_time.dylib (compatibility version 0.0.0, current version 0.0.0)
/nix/store/rd912bdihq9azqhmx37p39yp05mv8vca-boost-1.81.0/lib/libboost_filesystem.dylib (compatibility version 0.0.0, current version 0.0.0)
/nix/store/rd912bdihq9azqhmx37p39yp05mv8vca-boost-1.81.0/lib/libboost_atomic.dylib (compatibility version 0.0.0, current version 0.0.0)
/nix/store/rd912bdihq9azqhmx37p39yp05mv8vca-boost-1.81.0/lib/libboost_system.dylib (compatibility version 0.0.0, current version 0.0.0)
/nix/store/rd912bdihq9azqhmx37p39yp05mv8vca-boost-1.81.0/lib/libboost_iostreams.dylib (compatibility version 0.0.0, current version 0.0.0)
/nix/store/rd912bdihq9azqhmx37p39yp05mv8vca-boost-1.81.0/lib/libboost_regex.dylib (compatibility version 0.0.0, current version 0.0.0)
/nix/store/rd912bdihq9azqhmx37p39yp05mv8vca-boost-1.81.0/lib/libboost_unit_test_framework.dylib (compatibility version 0.0.0, current version 0.0.0)
/nix/store/rd912bdihq9azqhmx37p39yp05mv8vca-boost-1.81.0/lib/libboost_python311.dylib (compatibility version 0.0.0, current version 0.0.0)
/nix/store/rd912bdihq9azqhmx37p39yp05mv8vca-boost-1.81.0/lib/libboost_nowide.dylib (compatibility version 0.0.0, current version 0.0.0)
/nix/store/0w070w3a2azyy1gs4mgskz9j3pq0g5dy-libcxxabi-16.0.6/lib/libc++abi.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/nix/store/jkp27cvkfzy264pgmwgry17rkyi50m3r-gettext-0.21.1/lib/libintl.8.dylib (compatibility version 12.0.0, current version 12.0.0)
/nix/store/a78xnmg223s3iffja69ydg6sswbwd3i3-libiconv-50/lib/libiconv.dylib (compatibility version 7.0.0, current version 7.0.0)
/nix/store/p5wr7bxrs2naa4rwy9sqs19rljr7g7qh-libcxx-16.0.6/lib/libc++.1.0.dylib (compatibility version 1.0.0, current version 1.0.0)