[CONPY-176] tried to install mariadb through pip on linux arch an exception araised Created: 2021-11-11  Updated: 2021-11-18  Resolved: 2021-11-18

Status: Closed
Project: MariaDB Connector/Python
Component/s: Installation
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Kristoffer Gjøsund Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

Using cached mariadb-0.9.52.tar.gz (72 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9xj1hg5a/mariadb_6364e3854095443fbf00ec4a9270e6c6/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9xj1hg5a/mariadb_6364e3854095443fbf00ec4a9270e6c6/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-1us9252s
cwd: /tmp/pip-install-9xj1hg5a/mariadb_6364e3854095443fbf00ec4a9270e6c6/
Complete output (12 lines):
/bin/sh: line 1: mariadb_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-9xj1hg5a/mariadb_6364e3854095443fbf00ec4a9270e6c6/setup.py", line 24, in <module>
cfg = get_config(options)
File "/tmp/pip-install-9xj1hg5a/mariadb_6364e3854095443fbf00ec4a9270e6c6/mariadb_posix.py", line 49, in get_config
cc_version = mariadb_config(config_prg, "cc_version")
File "/tmp/pip-install-9xj1hg5a/mariadb_6364e3854095443fbf00ec4a9270e6c6/mariadb_posix.py", line 26, in mariadb_config
raise EnvironmentError(
OSError: mariadb_config not found.
Please make sure, that MariaDB Connector/C is installed on your system, edit the configuration file 'site.cfg' and set the 'mariadb_config'
option, which should point to the mariadb_config utility.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/d9/70/d5048fa20d2cd986181094cc35ccae284f36e80fe61e2821b79d281b03a2/mariadb-0.9.52.tar.gz#sha256=554e7067ea68430fb7c3b4df1be7c9f2ff3ab7bf806c2d9076f959645e7a96de(from https://pypi.org/simple/mariadb/) (requires-python:>=3.6). 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 mariadb (from versions: 0.9.52, 0.9.53, 0.9.54,0.9.55, 0.9.56, 0.9.57, 0.9.58, 0.9.59, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.1.0a1, 1.1.0b1, 1.1.0b2)
ERROR: No matching distribution found for mariadb



 Comments   
Comment by Alice Sherepa [ 2021-11-12 ]

Do you have MariaDB Connector/C installed? (which is a prerequisite https://mariadb.com/docs/clients/mariadb-connectors/connector-python/install/)

Comment by Kristoffer Gjøsund [ 2021-11-18 ]

Greetings, thanks for getting back to me, the issue has been resolved, there's an error with the current arch version, which might cause pip to be broken, for regular uses. By using

"sudo pip install mariadb" the installation works fine, some how you've to be the root user in order to get access to the pip files. I'm sorry for the time you used to check over this issue, im quite thankful for the service you provided

regards,
@krigjo25

Generated at Thu Feb 08 03:30:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.