zopefoundation / Products.ZSQLMethods

SQL method support for Zope.
Other
3 stars 14 forks source link

Which DB adapter #13

Closed garrysadd closed 5 years ago

garrysadd commented 5 years ago

I am trying to get ZSQLmethods working on Zope4, but I can't find a DB adapter that works. SQLAlchemyDB and ZpsycopgDA will not install correctly.

Any suggestion or has anyone got something that has been fixed?

dataflake commented 5 years ago

https://pypi.org/project/Products.ZMySQLDA/ is fully compatible with Zope 4

garrysadd commented 5 years ago

Sorry should have made it more clear: I'm using Postgres.

garrysadd commented 5 years ago

trying to install Mysqlda with pip:


Collecting Products.ZMySQLDA
Using cached https://files.pythonhosted.org/packages/4e/e9/76964eb602b31f3cd28d226140ee35e53ae82bfd95e0dec059c4aabf2285/Products.ZMySQLDA-4.0-py2.py3-none-any.whl
Requirement already satisfied: six in ./lib/python3.6/site-packages (from Products.ZMySQLDA) (1.12.0)
Requirement already satisfied: setuptools in ./lib/python3.6/site-packages (from Products.ZMySQLDA) (40.8.0)
Collecting mysqlclient (from Products.ZMySQLDA)
  Using cached https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz
    Complete output from command python setup.py egg_info:
    /bin/sh: mysql_config: command not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/v6/82yxhmyd2yn5_z54fwf7kf1w0000gn/T/pip-install-noq4f5v5/mysqlclient/setup.py", line 16, in <module>
        metadata, options = get_config()
      File "/private/var/folders/v6/82yxhmyd2yn5_z54fwf7kf1w0000gn/T/pip-install-noq4f5v5/mysqlclient/setup_posix.py", line 51, in get_config
        libs = mysql_config("libs")
      File "/private/var/folders/v6/82yxhmyd2yn5_z54fwf7kf1w0000gn/T/pip-install-noq4f5v5/mysqlclient/setup_posix.py", line 29, in mysql_config
        raise EnvironmentError("%s not found" % (_mysql_config_path,))
    OSError: mysql_config not found```
dataflake commented 5 years ago

The error is pretty clear. mysqlclient requires a correctly set up MySQL or MariaDB environment, in which the mysql_config file can be located on the normal system paths.

garrysadd commented 5 years ago

Yep agreed, but when I correct that there is a whole rabbit hole to suck you in. Not going down the MySQL route, anything on a postgres connector?

dataflake commented 5 years ago

Can't help you on that. This is all getting a bit off-topic here.