KingMaina / alx-backend-user-data

Projects related to handling user data in applications
0 stars 1 forks source link

Encountered Build dependencies error #1

Open Parsaloi opened 5 months ago

Parsaloi commented 5 months ago

After setting up a python environment I tried running the pip3 install -r requirements.txt command but the following error was returned:

Collecting mysqlclient==2.1.0 (from -r requirements.txt (line 21))
  Using cached mysqlclient-2.1.0.tar.gz (87 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      /bin/sh: line 1: mysql_config: command not found
      /bin/sh: line 1: mariadb_config: command not found
      /bin/sh: line 1: mysql_config: command not found
      mysql_config --version
      mariadb_config --version
      mysql_config --libs
      Traceback (most recent call last):
        File "/home/parsaizme/Documents/parsal/collaboration/workerbeez/alx-se/alx-se-1/0x01-Basic_authentication/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/parsaizme/Documents/parsal/collaboration/workerbeez/alx-se/alx-se-1/0x01-Basic_authentication/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/parsaizme/Documents/parsal/collaboration/workerbeez/alx-se/alx-se-1/0x01-Basic_authentication/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ew9sa_39/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ew9sa_39/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-ew9sa_39/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-ew9sa_39/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 15, in <module>
        File "/tmp/pip-install-10iku599/mysqlclient_76a8d29953934ce9bb080614b120fb29/setup_posix.py", line 70, in get_config
          libs = mysql_config("libs")
                 ^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-10iku599/mysqlclient_76a8d29953934ce9bb080614b120fb29/setup_posix.py", line 31, in mysql_config
          raise OSError("{} not found".format(_mysql_config_path))
      OSError: mysql_config not found
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip
Parsaloi commented 5 months ago

Oh! @KingMaina I think I must have a mysql instance running...