Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install expects mysql_config, fails on Apple Silicon + macos 13.2.1 + miniconda3 #13

Open
rljacobson opened this issue Feb 23, 2023 · 5 comments

Comments

@rljacobson
Copy link

In a miniconda3 environment I ran pip install Mathics-omnibus. Lots of things appear to install without issue, and then it fails during installation of mysqlclient-2.1.1.tar.gz with the following:

Screenshot 2023-02-22 at 8 33 28 PM

Collecting mysqlclient
  Downloading mysqlclient-2.1.1.tar.gz (88 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.1/88.1 kB 4.8 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      /bin/sh: mysql_config: command not found
      /bin/sh: mariadb_config: command not found
      /bin/sh: mysql_config: command not found
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/jh/7cj9z0p55p5g9vv4dn5w177h0000gp/T/pip-install-n8_wf9s2/mysqlclient_d97784fe0fe34efb918c37e0818c7fe6/setup.py", line 15, in <module>
          metadata, options = get_config()
        File "/private/var/folders/jh/7cj9z0p55p5g9vv4dn5w177h0000gp/T/pip-install-n8_wf9s2/mysqlclient_d97784fe0fe34efb918c37e0818c7fe6/setup_posix.py", line 70, in get_config
          libs = mysql_config("libs")
        File "/private/var/folders/jh/7cj9z0p55p5g9vv4dn5w177h0000gp/T/pip-install-n8_wf9s2/mysqlclient_d97784fe0fe34efb918c37e0818c7fe6/setup_posix.py", line 31, in mysql_config
          raise OSError("{} not found".format(_mysql_config_path))
      OSError: mysql_config not found
      mysql_config --version
      mariadb_config --version
      mysql_config --libs
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

It's not clear to me if this issue belongs to mathics-omnibus or to one of the sub components. In any case, I'm surprised to see mysqlclient as a dependency.

@rocky
Copy link
Member

rocky commented Feb 23, 2023

It looks like this is needed for pymathics.natlang which pulls in nltk, and spacy. So if you remove that you may get further. But...

This weekend will be a major upgrade from version 5 to version 6. See https://hub.docker.com/r/mathicsorg/mathics for a preview of what we have so far.

And while we still have 3 or 4 major gaps in the code to fill (pattern matching one of them, so I'll looking at you and loris), a great deal has been improved in the areas of image processing, nltk, networkx graphs.

So after the 6.0.0 release is when we should check into this. Lots of rot, lots to do.

@rocky
Copy link
Member

rocky commented Feb 23, 2023

A couple of things.

First, I was able to build everything with the current 6.0.0 sources on miniconda3.

I looked at setup.py and it looks to me that pymathics.natlang should not be included in the base configuration. How exactly did you run the pip install?

@mmatera
Copy link
Contributor

mmatera commented Feb 23, 2023

What is seems to fail here is the installer of mysqlclient. It is looking for a mysql_config, which is not being installed. What uses a (sqllite) database is mathics-django. Maybe what is missing is to explicitly add that dependency.

@rocky
Copy link
Member

rocky commented Feb 23, 2023

@mmatera I thought that too, until I tried removing in docker mariadb and mysqlclient from the OS and tried to build the docker image without . The thing to note that is the very first line in the screen output which in about installing PyPI package future.

Although Robert doesn't give the full log or the input he typed - shame on you Robert - this matches a section involved in installing pymathics.natlang.

If Robert doesn't want to remove pymathic.natlang, then he needs to have on the OS side, some sort of mysql around (we use mariadb, but there are others) and a way to connect that which is what mysqlclient needs.

@rljacobson
Copy link
Author

The command I used is pip install Mathics-omnibus.

I will investigate this issue more this evening and report back.

@rocky I'll open another issue to discuss possible directions for Mathics post v6.0. I'm glad you got involved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants