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

Error during installation mysql_config not found #153

Open
FloLaco opened this issue Dec 6, 2021 · 3 comments
Open

Error during installation mysql_config not found #153

FloLaco opened this issue Dec 6, 2021 · 3 comments

Comments

@FloLaco
Copy link

FloLaco commented Dec 6, 2021

Hi,

I'm trying to build a docker image with your plugin, but I get an error when I try to pip install :

Step 3/3 : RUN pip3 install git+https://github.com/nautobot/nautobot-plugin-version-control && echo nautobot-plugin-version-control >> local_requirements.txt
 ---> Running in 1724d9d5452b
Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://github.com/nautobot/nautobot-plugin-version-control
  Cloning https://github.com/nautobot/nautobot-plugin-version-control to /tmp/pip-req-build-iyxdgo3u
  Running command git clone --filter=blob:none -q https://github.com/nautobot/nautobot-plugin-version-control /tmp/pip-req-build-iyxdgo3u
  Resolved https://github.com/nautobot/nautobot-plugin-version-control to commit f3eadedd6c99a90776381e7c3ea88e88ca959c6e
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting nautobot<1.3.0,>=1.2.0b1
  Downloading nautobot-1.2.0b1-py3-none-any.whl (25.9 MB)
Collecting mysqlclient<3.0.0,>=2.0.3
  Downloading mysqlclient-2.1.0.tar.gz (87 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-27rer3sr/mysqlclient_7c64629a7a46432e9ba5caf0e1ab1821/setup.py'"'"'; __file__='"'"'/tmp/pip-install-27rer3sr/mysqlclient_7c64629a7a46432e9ba5caf0e1ab1821/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-5avo0m44
       cwd: /tmp/pip-install-27rer3sr/mysqlclient_7c64629a7a46432e9ba5caf0e1ab1821/
  Complete output (15 lines):
  mysql_config --version
  /bin/sh: 1: mysql_config: not found
  mariadb_config --version
  /bin/sh: 1: mariadb_config: not found
  mysql_config --libs
  /bin/sh: 1: mysql_config: not found
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-27rer3sr/mysqlclient_7c64629a7a46432e9ba5caf0e1ab1821/setup.py", line 15, in <module>
      metadata, options = get_config()
    File "/tmp/pip-install-27rer3sr/mysqlclient_7c64629a7a46432e9ba5caf0e1ab1821/setup_posix.py", line 70, in get_config
      libs = mysql_config("libs")
    File "/tmp/pip-install-27rer3sr/mysqlclient_7c64629a7a46432e9ba5caf0e1ab1821/setup_posix.py", line 31, in mysql_config
      raise OSError("{} not found".format(_mysql_config_path))
  OSError: mysql_config not found
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/de/79/d02be3cb942afda6c99ca207858847572e38146eb73a7c4bfe3bdf154626/mysqlclient-2.1.0.tar.gz#sha256=973235686f1b720536d417bf0a0d39b4ab3d5086b2b6ad5e6752393428c02b12 (from https://pypi.org/simple/mysqlclient/) (requires-python:>=3.5). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Downloading mysqlclient-2.0.3.tar.gz (88 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-27rer3sr/mysqlclient_aa088e9f6a60436f9f8e922d44e2b366/setup.py'"'"'; __file__='"'"'/tmp/pip-install-27rer3sr/mysqlclient_aa088e9f6a60436f9f8e922d44e2b366/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-5p4ymit_
       cwd: /tmp/pip-install-27rer3sr/mysqlclient_aa088e9f6a60436f9f8e922d44e2b366/
  Complete output (15 lines):
  mysql_config --version
  /bin/sh: 1: mysql_config: not found
  mariadb_config --version
  /bin/sh: 1: mariadb_config: not found
  mysql_config --libs
  /bin/sh: 1: mysql_config: not found
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-27rer3sr/mysqlclient_aa088e9f6a60436f9f8e922d44e2b366/setup.py", line 15, in <module>
      metadata, options = get_config()
    File "/tmp/pip-install-27rer3sr/mysqlclient_aa088e9f6a60436f9f8e922d44e2b366/setup_posix.py", line 70, in get_config
      libs = mysql_config("libs")
    File "/tmp/pip-install-27rer3sr/mysqlclient_aa088e9f6a60436f9f8e922d44e2b366/setup_posix.py", line 31, in mysql_config
      raise OSError("{} not found".format(_mysql_config_path))
  OSError: mysql_config not found
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/3c/df/59cd2fa5e48d0804d213bdcb1acb4d08c403b61c7ff7ed4dd4a6a2deb3f7/mysqlclient-2.0.3.tar.gz#sha256=f6ebea7c008f155baeefe16c56cd3ee6239f7a5a9ae42396c2f1860f08a7c432 (from https://pypi.org/simple/mysqlclient/) (requires-python:>=3.5). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement mysqlclient<3.0.0,>=2.0.3 (from nautobot-version-control) (from versions: 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11rc1, 1.3.11, 1.3.12, 1.3.13, 1.3.14, 1.4.0rc1, 1.4.0rc2, 1.4.0rc3, 1.4.0, 1.4.1, 1.4.2, 1.4.2.post1, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0rc1, 2.1.0)
ERROR: No matching distribution found for mysqlclient<3.0.0,>=2.0.3

I'm using a postgresql database (django.db.backends.postgresql) for my nautobot installation

@glennmatthews
Copy link
Contributor

This plugin requires a Dolt database backend; it's not compatible with PostgreSQL. That may not directly address the issue reported here, but I figured you would want to know that.

@dgarros
Copy link
Contributor

dgarros commented Dec 8, 2021

I encountered a similar issue on Mac OS recently and to resolve my issue I had to :

  • Install the SQL client brew install mysqlclient
  • Update my PATH export PATH=/usr/local/opt/mysql-client/bin:$PATH

@FloLaco
Copy link
Author

FloLaco commented Dec 9, 2021

@glennmatthews I know this plugin is using a Dolt database, but it seems that Dolt is using itself a mysql component (client only?).

@dgarros Thanks Damien, I'll try to install mysql client into the nautobot docker image

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