error installing mysqlclient

22 views
Skip to first unread message

Adam Weremczuk

unread,
May 14, 2020, 8:51:42 AM5/14/20
to Review Board Community
Hi all,

I have been trying to install on Debian 9 following: https://www.reviewboard.org/docs/manual/3.0/admin/installation/linux/

Everything was going fine until:

 sudo pip install -U mysqlclient
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting mysqlclient
  Using cached mysqlclient-1.4.6.tar.gz (85 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yERS_t/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-yERS_t/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-f9sP8G
         cwd: /tmp/pip-install-yERS_t/mysqlclient/
    Complete output (12 lines):
    sh: 1: mysql_config: not found
    sh: 1: mariadb_config: not found
    sh: 1: mysql_config: not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-yERS_t/mysqlclient/setup.py", line 16, in <module>
        metadata, options = get_config()
      File "setup_posix.py", line 61, in get_config
        libs = mysql_config("libs")
      File "setup_posix.py", line 29, in mysql_config
        raise EnvironmentError("%s not found" % (_mysql_config_path,))
    EnvironmentError: mysql_config not found
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Mysql-server (mariadb-server) is already installed.
Installing mysql-client doesn't make this error go away.

Any idea?

Cheers,
Adam

Adam Weremczuk

unread,
May 14, 2020, 11:12:02 AM5/14/20
to Review Board Community
I've tried "sudo pip install pymysql" instead which installed fine.

Now when running "rb-site install" I'm not presented with MySQL / MariaDB option at all:

* What database type will you be using?


   
You can type either the name or the number from the list below.


   
(1) sqlite3 (not supported for production use)


Database Type:


I'm not sure if it's related to mysqlclient or the other issue I've had: https://groups.google.com/d/msg/reviewboard/rm3UK8n5gbE/d_EOTcr8CQAJ 

Christian Hammond

unread,
May 17, 2020, 11:42:32 PM5/17/20
to revie...@googlegroups.com
Hi Adam,

Try installing the mariadb-devel package from yum and then re-installing the mysqlclient Python package.

The pymysql package is not supported by Django (at least not the version used by Review Board).

I'll see about updating the docs for MariaDB.

Christian

--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/12dd45b1-b9a0-4162-b623-d9d17b82fb7d%40googlegroups.com.


--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

Adam Weremczuk

unread,
May 18, 2020, 8:15:30 AM5/18/20
to revie...@googlegroups.com
Hi Christian,

I've figured this out myself.

"libmariadbclient-dev" appears to be working for MariaDB and "libmysqlclient-dev" for MySQL

Thanks,
Adam

Reply all
Reply to author
Forward
0 new messages