Problem running piecash
ihf last edited by ccc
I did a pip install piecash (it's a python interface to GnuCash) . I had to add a couple of dependencies using pip that showed up when I did import piecash. Now I get the following:
>>> import piecash Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages-2/piecash/__init__.py", line 15, in <module> from .core import ( File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages-2/piecash/core/__init__.py", line 1, in <module> from .session import create_book, open_book, Version File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages-2/piecash/core/session.py", line 11, in <module> from piecash.core import factories ImportError: cannot import name factories
ccc last edited by ccc
Here you are installing into site-packages-2 but piecash no longer supports legacy Python.
ccc last edited by ccc
python interface to GnuCash
Is GnuCash pure Python? https://github.com/Gnucash looks to be ~75% C code.
ihf last edited by ihf
Not running GnuCash, just piecash which is an interface to the GnuCash SQLite dB. Will try with Python 3. Since pip does not run under Python 3, what is the best way to install piecash? Just move things from site packages 2 to 3?
mikael last edited by
@ihf, I would take the zip from piecash Github and expand it to sitepackages.
JonB last edited by
Does factories.py actually exist under piecash/core?
It is probably also a good idea to force quit Pythonista.
ihf last edited by
I am back to trying to get piecash to work with Pythonista. I can install piecash but if I try to open a mysql based Gnucash file. I get an error about MySQLdb module not found. If I try to install MySQLclient (which I believe has that module), I get:
[~/Documents]$ pip install mysqlclient Querying PyPI ... Downloading package ... Opening: https://files.pythonhosted.org/packages/de/79/d02be3cb942afda6c99ca207858847572e38146eb73a7c4bfe3bdf154626/mysqlclient-2.1.0.tar.gz Save as: /private/var/mobile/Containers/Data/Application/5CF6F970-CA4A-42FF-B937-D741C4282F1E/tmp//mysqlclient-2.1.0.tar.gz (87635 bytes) [====================] 100.00% | 85.6KiB Extracting archive file ... Archive extracted. Running setup file ... mysql_config --version mariadb_config --version mysql_config --libs PermissionError(1, 'Operation not permitted') Failed to run setup.py Fall back to directory guessing ... Error: Cannot locate packages. Manual installation required. [~/Documents]$ pip install mysqldb Querying PyPI ... Error: Failed to fetch package release urls```