KIRA009 / expense-splitter-backend

This is the api for the frontend, which is at https://github.com/KIRA009/expense-splitter-frontend
1 stars 3 forks source link

Stuck in Installation #1

Open KIRA009 opened 4 years ago

sp35 commented 4 years ago

Error installing mysqlclient==1.4.4 What is the python version of the current project?

KIRA009 commented 4 years ago

Error installing mysqlclient==1.4.4 What is the python version of the current project?

We are using Python3.6.8. However anything higher than Python3.6 should work.

Can you provide the following info: 1) OS 2) Python version 3) The exact error message showing in the terminal/console

sp35 commented 4 years ago
  1. Ubuntu 18.04
  2. Python 3.7.3

Collecting mysqlclient==1.4.4 Using cached https://files.pythonhosted.org/packages/4d/38/c5f8bac9c50f3042c8f05615f84206f77f03db79781db841898fde1bb284/mysqlclient-1.4.4.tar.gz ERROR: Command errored out with exit status 1: command: /home/shubham/Desktop/denv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gok1_2j7/mysqlclient/setup.py'"'"'; file='"'"'/tmp/pip-install-gok1_2j7/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-install-gok1_2j7/mysqlclient/pip-egg-info cwd: /tmp/pip-install-gok1_2j7/mysqlclient/ Complete output (12 lines): /bin/sh: 1: mysql_config: not found /bin/sh: 1: mariadb_config: not found /bin/sh: 1: mysql_config: not found Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-gok1_2j7/mysqlclient/setup.py", line 16, in metadata, options = get_config() File "/tmp/pip-install-gok1_2j7/mysqlclient/setup_posix.py", line 61, in get_config libs = mysql_config("libs") File "/tmp/pip-install-gok1_2j7/mysqlclient/setup_posix.py", line 29, in mysql_config raise EnvironmentError("%s not found" % (_mysql_config_path,)) OSError: mysql_config not found

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

KIRA009 commented 4 years ago

Make sure you have mysql installed

Run the following commands and then try installing the requirements

sudo apt-get install mysql-server
sudo apt-get install libmysqlclient-dev

Also, if you are using mysql and not psql, you can comment out psycopg2==2.8.4 from requirements.txt, because I believe you will face similar errors when installing that

sp35 commented 4 years ago

Thanks, now I got it. I am using psql now as I guess it is your production database too, mentioned in readme.