0
votes

I have an app that I am writing purely in the google cloud app engine environment and have a couple of requirements that fail to install. Flask-mysqldb and functools.

I was wondering if you could help me with them. This is what happens when i try to install functools

Collecting functools Using cached https://files.pythonhosted.org/packages/22/3c/33589bf30422a92cf8c77054f2cf940ef2acc8a2857e5664045ed75a1c6a/functools-0.5.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/setuptools/init.py", line 4, in import functools File "functools.py", line 72, in globals()['c_%s' % x] = globals()[x] = getattr(_functools, x) AttributeError: 'module' object has no attribute 'compose' Command


"python setup.py egg_info" failed with error code 1 in /tmp/pip-install-Oqd8QA/functools/

and this is what happens when I try to install Flask-mysqldb:

Collecting flask-mysqldb Using cached https://files.pythonhosted.org/packages/62/e3/955c845efe1aacf30c8e2607470544ede36aa1044f6382c809f13e014104/Flask-MySQLdb-0.2.0.tar.gz Collecting Flask>=0.10 (from flask-mysqldb) Using cached https://files.pythonhosted.org/packages/7f/e7/08578774ed4536d3242b14dacb4696386634607af824ea997202cd0edb4b/Flask-1.0.2-py2.py3-none-any.whl Collecting mysqlclient (from flask-mysqldb) Using cached https://files.pythonhosted.org/packages/ec/fd/83329b9d3e14f7344d1cb31f128e6dbba70c5975c9e57896815dbb1988ad/mysqlclient-1.3.13.tar.gz Complete output from command python setup.py egg_info: sh: 1: mysql_config: not found Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-i07vlu/mysqlclient/setup.py", line 18, in metadata, options = get_config() File "setup_posix.py", line 53, in get_config libs = mysql_config("libs_r") File "setup_posix.py", line 28, in mysql_config raise EnvironmentError("%s not found" % (mysql_config.path,)) EnvironmentError: mysql_config not found


Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-i07vlu/mysqlclient/

any help would be greatly appreciated. Thanks!

1
that's possible, should i be installing functools32? Might need to rewrite some of my code however.ingenium21
cool, I think that worked! Thank you. any knowledge on flask-mysqldb?ingenium21

1 Answers

0
votes

Thank you so much @snakecharmerb for the helpful answer, the cause of the issue might have been that the last released version of functools package was around 2005 (functools release history, last dated 2005) , so changing the import statement (as snakecharmerb mentioned) to import functools32 as functools should work as it would just redirect the reference.

For the error you are receiving while installing the Flask-mysqldb, as @serbia99 previously mentioned that it could be happening because of the possible duplication. Please it might be helpful to check if mysql_config is missing, also please try sudo apt-get install libmysqlclient-dev as it would populate the missing configuration file. It solved similar issues in the past for multiple cases. Thanks!