Installation error on mac (manually)

@darnpunk looks like the issue is mysql-python not installed, this thread might help

1 Like

I have installed mysql-python but now I am getting another error:

Command “python setup.py egg_info” failed with error code 1 in /private/var/folders/p6/yyn74c_d3cb3yppcz1cv_85w0000gn/T/pip-build-o3iS5S/mysql-python/

Also when I run bench mysql it shows Error: No such command “mysql”. I have mariadb installed. Here is my pip list

ansible (2.0.2.0) asn1crypto (0.22.0) bench (4.1.0, /Users/arsyad/Documents/Arsyad/work/python/frappe/bench-repo) cffi (1.10.0) click (6.7) cryptography (1.8.1) enum34 (1.1.6) gitdb (0.6.4) GitPython (0.3.2rc1) honcho (1.0.1) idna (2.5) ipaddress (1.0.18) Jinja2 (2.9.6) MarkupSafe (1.0) meld3 (1.0.2) MySQL-python (1.2.5) paramiko (2.1.2) pbr (3.0.0) pip (9.0.1) psutil (5.2.2) pyasn1 (0.2.3) pycparser (2.17) pycrypto (2.6.1) python-crontab (2.2.0) python-dateutil (2.6.0) PyYAML (3.12) requests (2.13.0) semantic-version (2.6.0) setuptools (32.1.0) six (1.10.0) smmap (0.9.0) stevedore (1.21.0) supervisor (3.3.1) virtualenv (15.1.0) virtualenv-clone (0.2.6) virtualenvwrapper (4.7.2) wheel (0.29.0)
Here is my brew list:

cmake                   
icu4c                   
mariadb                 
node                    
pkg-config              
readline                
sqlite
gdbm                    
libevent               
mysql-connector-c       
openssl                 
python                  
redis

Is there a way to uninstall everything and start again?

Regards,
Arsyad

It is working now. I missed one command which is xcode-select --install. After which I needed to do

brew remove mysql
brew install mariadb

pip uninstall MySQL-python
pip install MySQL-python

After that installing works. I created a new site and set developer_mode = 1. However, during the setup wizard, I noticed that it only asks to setup country, a user and nothing else. And when I go to the Desk, there are only 3 icons. Tools, Email Inbox and Developer.

When I ran the easy install on a VM, the setup wizard asks for more information like Company name, supplier and so on. The Desk on the VM download also had more icons. Is that how it is meant to be?

Hi @darnpunk

bench install-app erpnext under frappe-bench folder

Thanks

I already did that but somehow it doesn’t work. Should I delete the database and the frappe-bench folder and reinstall again?

@darnpunk

bench --site site_name reinstall

Thanks

The command works but I still don’t see the icons (e.g. Accounting, Invoicing etc). I also tried removing erpnext, added back and reinstall the site.

It is as if erpnext app doesn’t get installed. In the terminal this is what I see:

bench --site boxcows.local reinstall
This will wipe your database. Are you sure you want to reinstall? [y/N]: y
Installing frappe...
Updating DocTypes for frappe        : [========================================]
Updating country info               : [========================================]
Set Administrator password: 
Re-enter Administrator password:
*** Scheduler is enabled ***

I was expecting to see “Installing erpnext” as well. Or is that it?

@darnpunk

From the frappe-bench folder you need to do
1. bench get-app erpnext 2. bench --site boxcows.local install-app erpnext

Once you have completed the above you will then commence the setup steps.

However, if you had already began the setup process before installing ERPNext, the system will ask you to reinstall again as it will require a fresh install of frappe.

That works and I can see more steps now during the Setup Wizard. However, I always see “There were errors” messages.

And in console there is only these:

localStorage cleared
desk.min.js:147 Cleared App Cache.
desk.min.js:181 localStorage cleared
Failed to load resource: net::ERR_EMPTY_RESPONSE
jquery.min.js:4 POST http://127.0.0.1:8000/ net::ERR_EMPTY_RESPONSE

I didn’t check the boxes “Create a website” and “Add sample records”.

Do i need to re-install or configure to use domain?

How/what is the configuration like at the moment and yes maybe a reinstall might be better, easier to determine if there are any issues.

I tried with Firefox and I don’t see the ERR_EMPTY_RESPONSE. But after a while of waiting during setup wizard, it just returns message “There were errors”. No messages inside console.

Here are my configurations:

pip list
ansible (2.0.2.0)
appdirs (1.4.3)
asn1crypto (0.22.0)
bench (4.1.0, /Users/arsyad/Documents/Arsyad/work/python/frappe/bench-repo)
cffi (1.10.0)
click (6.7)
cryptography (1.8.1)
enum34 (1.1.6)
gitdb (0.6.4)
GitPython (0.3.2rc1)
honcho (1.0.1)
idna (2.5)
ipaddress (1.0.18)
Jinja2 (2.9.6)
MarkupSafe (1.0)
meld3 (1.0.2)
MySQL-python (1.2.5)
packaging (16.8)
paramiko (2.1.2)
pbr (3.0.0)
pip (9.0.1)
psutil (5.2.2)
pyasn1 (0.2.3)
pycparser (2.17)
pycrypto (2.6.1)
pyparsing (2.2.0)
python-crontab (2.2.0)
python-dateutil (2.6.0)
PyYAML (3.12)
requests (2.13.0)
semantic-version (2.6.0)
setuptools (35.0.1)
six (1.10.0)
smmap (0.9.0)
stevedore (1.21.0)
supervisor (3.3.1)
virtualenv (15.1.0)
virtualenv-clone (0.2.6)
virtualenvwrapper (4.7.2)
wheel (0.29.0)    

brew list --versions
cmake 3.8.0
gdbm 1.13
icu4c 58.2
libevent 2.0.22
mariadb 10.1.22
node 7.9.0
openssl 1.0.2k
pkg-config 0.29.2
python 2.7.13
readline 7.0.3_1
redis 3.0.3
sqlite 3.18.0

bench --version
4.1.0

ERPNext is version 8.0.20
Frappe is version 8.0.27

I have tried to reinstall site, reinstalled bench, reinstalled erpnext, clear cache and restarted my computer. Still somehow cannot get through the setup wizard.

I managed to get it to work. Not sure what happened. I did a bench update again, reinstalled the site again and used Firefox to do the setup wizard. This time round I used localhost instead of 127.0.0.1.

Not sure if that made the difference. Now it works fine and I can see all the icons. :sunglasses:

1 Like

@darnpunk

Hey that’s awesome, glad to know that you have it working.

2 Likes

I am encountering errors again and really need help. Been at the issue for weeks now. Few weeks ago I tried to update my bench but encountered an error which I posted here - Error when running bench update (MacOS)

Since nothing works, I uninstalled mariadb. Here are the commands I ran:

brew remove mariah
brew install mariadb

pip uninstall MySQL-python
pip install MySQL-python

After I ran this, I can’t get the last command done. It shows me the error below:

pip install MySQL-python
Collecting MySQL-python
  Using cached MySQL-python-1.2.5.zip
Building wheels for collected packages: MySQL-python
  Running setup.py bdist_wheel for MySQL-python ... error
  Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/p6/yyn74c_d3cb3yppcz1cv_85w0000gn/T/pip-build-CQikXQ/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/p6/yyn74c_d3cb3yppcz1cv_85w0000gn/T/tmpxEGSa9pip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.12-x86_64-2.7
  copying _mysql_exceptions.py -> build/lib.macosx-10.12-x86_64-2.7
  creating build/lib.macosx-10.12-x86_64-2.7/MySQLdb
  copying MySQLdb/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
  copying MySQLdb/converters.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
  copying MySQLdb/connections.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
  copying MySQLdb/cursors.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
  copying MySQLdb/release.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
  copying MySQLdb/times.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
  creating build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/CR.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/ER.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  running build_ext
  building '_mysql' extension
  creating build/temp.macosx-10.12-x86_64-2.7
  clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/local/Cellar/mariadb/10.2.6/include/mysql -I/usr/local/Cellar/mariadb/10.2.6/include/mysql/.. -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.12-x86_64-2.7/_mysql.o
  In file included from _mysql.c:44:
  /usr/local/Cellar/mariadb/10.2.6/include/mysql/my_config.h:286:11: warning: 'SIZEOF_SIZE_T' macro redefined [-Wmacro-redefined]
    #define SIZEOF_SIZE_T  SIZEOF_LONG
            ^
  /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7/pymacconfig.h:43:17: note: previous definition is here
  #        define SIZEOF_SIZE_T           8
                  ^
  _mysql.c:266:44: warning: unused variable 's' [-Wunused-variable]
          char **cmd_args_c=NULL, **groups_c=NULL, *s;
                                                    ^
  _mysql.c:267:21: warning: unused variable 'groupc' [-Wunused-variable]
          int cmd_argc=0, i, groupc;
                             ^
  _mysql.c:267:18: warning: unused variable 'i' [-Wunused-variable]
          int cmd_argc=0, i, groupc;
                          ^
  _mysql.c:268:53: warning: unused variable 'item' [-Wunused-variable]
          PyObject *cmd_args=NULL, *groups=NULL, *ret=NULL, *item;
                                                             ^
  _mysql.c:351:3: warning: unused label 'finish' [-Wunused-label]
    finish:
    ^~~~~~~
  _mysql.c:267:6: warning: unused variable 'cmd_argc' [-Wunused-variable]
          int cmd_argc=0, i, groupc;
              ^
  _mysql.c:1589:10: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
          if (how < 0 || how >= sizeof(row_converters)) {
              ~~~ ^ ~
  _mysql.c:1943:47: warning: incompatible pointer types passing 'MYSQL *' (aka 'struct st_mysql *') to parameter of type 'MYSQL_RES *' (aka 'struct st_mysql_res *') [-Wincompatible-pointer-types]
          return PyInt_FromLong((long)mysql_num_fields(&(self->connection)));
                                                       ^~~~~~~~~~~~~~~~~~~
  /usr/local/Cellar/mariadb/10.2.6/include/mysql/mysql.h:470:50: note: passing argument to parameter 'res' here
  unsigned int STDCALL mysql_num_fields(MYSQL_RES *res);
                                                   ^
  _mysql.c:2005:42: error: no member named 'reconnect' in 'struct st_mysql'
          if ( reconnect != -1 ) self->connection.reconnect = reconnect;
                                 ~~~~~~~~~~~~~~~~ ^
  _mysql.c:2085:3: error: too few arguments to function call, expected 2, have 1
                  );
                  ^
  /usr/local/Cellar/mariadb/10.2.6/include/mysql/mysql.h:518:1: note: 'mysql_shutdown' declared here
  int             STDCALL mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level);
  ^
  9 warnings and 2 errors generated.
  error: command 'clang' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for MySQL-python
  Running setup.py clean for MySQL-python
Failed to build MySQL-python
Installing collected packages: MySQL-python
  Running setup.py install for MySQL-python ... error
    Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/p6/yyn74c_d3cb3yppcz1cv_85w0000gn/T/pip-build-CQikXQ/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/p6/yyn74c_d3cb3yppcz1cv_85w0000gn/T/pip-vDYZ9W-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.12-x86_64-2.7
    copying _mysql_exceptions.py -> build/lib.macosx-10.12-x86_64-2.7
    creating build/lib.macosx-10.12-x86_64-2.7/MySQLdb
    copying MySQLdb/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
    copying MySQLdb/converters.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
    copying MySQLdb/connections.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
    copying MySQLdb/cursors.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
    copying MySQLdb/release.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
    copying MySQLdb/times.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
    creating build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/CR.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/ER.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    running build_ext
    building '_mysql' extension
    creating build/temp.macosx-10.12-x86_64-2.7
    clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/local/Cellar/mariadb/10.2.6/include/mysql -I/usr/local/Cellar/mariadb/10.2.6/include/mysql/.. -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.12-x86_64-2.7/_mysql.o
    In file included from _mysql.c:44:
    /usr/local/Cellar/mariadb/10.2.6/include/mysql/my_config.h:286:11: warning: 'SIZEOF_SIZE_T' macro redefined [-Wmacro-redefined]
      #define SIZEOF_SIZE_T  SIZEOF_LONG
              ^
    /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7/pymacconfig.h:43:17: note: previous definition is here
    #        define SIZEOF_SIZE_T           8
                    ^
    _mysql.c:351:3: warning: unused label 'finish' [-Wunused-label]
      finish:
      ^~~~~~~
    _mysql.c:267:21: warning: unused variable 'groupc' [-Wunused-variable]
            int cmd_argc=0, i, groupc;
                               ^
    _mysql.c:266:44: warning: unused variable 's' [-Wunused-variable]
            char **cmd_args_c=NULL, **groups_c=NULL, *s;
                                                      ^
    _mysql.c:267:6: warning: unused variable 'cmd_argc' [-Wunused-variable]
            int cmd_argc=0, i, groupc;
                ^
    _mysql.c:267:18: warning: unused variable 'i' [-Wunused-variable]
            int cmd_argc=0, i, groupc;
                            ^
    _mysql.c:268:53: warning: unused variable 'item' [-Wunused-variable]
            PyObject *cmd_args=NULL, *groups=NULL, *ret=NULL, *item;
                                                               ^
    _mysql.c:1589:10: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
            if (how < 0 || how >= sizeof(row_converters)) {
                ~~~ ^ ~
    _mysql.c:1943:47: warning: incompatible pointer types passing 'MYSQL *' (aka 'struct st_mysql *') to parameter of type 'MYSQL_RES *' (aka 'struct st_mysql_res *') [-Wincompatible-pointer-types]
            return PyInt_FromLong((long)mysql_num_fields(&(self->connection)));
                                                         ^~~~~~~~~~~~~~~~~~~
    /usr/local/Cellar/mariadb/10.2.6/include/mysql/mysql.h:470:50: note: passing argument to parameter 'res' here
    unsigned int STDCALL mysql_num_fields(MYSQL_RES *res);
                                                     ^
    _mysql.c:2005:42: error: no member named 'reconnect' in 'struct st_mysql'
            if ( reconnect != -1 ) self->connection.reconnect = reconnect;
                                   ~~~~~~~~~~~~~~~~ ^
    _mysql.c:2085:3: error: too few arguments to function call, expected 2, have 1
                    );
                    ^
    /usr/local/Cellar/mariadb/10.2.6/include/mysql/mysql.h:518:1: note: 'mysql_shutdown' declared here
    int             STDCALL mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level);
    ^
    9 warnings and 2 errors generated.
    error: command 'clang' failed with exit status 1
    
    ----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/p6/yyn74c_d3cb3yppcz1cv_85w0000gn/T/pip-build-CQikXQ/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/p6/yyn74c_d3cb3yppcz1cv_85w0000gn/T/pip-vDYZ9W-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/p6/yyn74c_d3cb3yppcz1cv_85w0000gn/T/pip-build-CQikXQ/MySQL-python/

It looks as if there is an error in the script. I even tried uninstalling Xcode command line tools and reinstalling it back. And ran the commands again. Still the same error.

I am running MacOS Sierra. Any help is greatly appreciated!

I followed steps listed here to get MySQL-python installed - python - Installing mysqlclient for mariadb on mac os for python3 - Stack Overflow

@darnpunk

Having also followed the steps you’ve pointed out above I was still not able to get it to install frappe.

However, after numerous trials & errors this is what I had done to end up with a working development on MacOS Sierra without having to do a clean install.

I’ve included steps from the beginning and anyone can pick up from wherever they are stuck. This is what worked for me and may or may not work for others, You really have to see what errors you are getting to get a MacOS installation successfully.

brew install python
brew install mariadb
brew install git
brew install nodejs
brew install nginx
brew install redis
brew install supervisor
brew install caskroom/cask/wkhtmltopdf
brew install mysql-connector-c
pip install supervisor

** Check version after install

To install MySQL-Python I had to unlink both mariadb and mariadb-connector-c so that it would install without any issues

brew unlink mariadb
brew unlink mariadb-connector-c
pip install MySQL-python
ln -s /usr/local/opt/mariadb-connector-c/bin/mariadb_config /usr/local/bin/mysql_config
pip install MySQL-python
pip list – Check MySQL-Python appears on list
brew link --overwrite mariadb

for some reason the installation of mysqlclient interfered with installing frappe so in my case I uninstalled it then reinstalled (may not be the case with others)

pip uninstall mysqlclient
bench init frappe-bench && cd frappe-bench
pip install mysqlclient

(Use this option if bench init frappe-bench did not install properly)
get-app GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript
bench get-app erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)

brew services restart mariadb

npm install babel-core less chokidar babel-preset-es2015 babel-preset-es2016 babel-preset-es2017 babel-preset-babili
npm install express
npm install socket.io
npm install redis
npm install superagent

bench setup procfile
bench setup redis
brew services start supervisor

bench --site site1.local install-app erpnext
bench start

For reference following is what the current PIP installs are


ansible (2.0.2.0)
asn1crypto (0.22.0)
bench (4.1.0, /Users/user/Sites/erpnext/bench-repo)
certifi (2017.4.17)
cffi (1.10.0)
chardet (3.0.3)
click (6.7)
cryptography (1.9)
cssmin (0.2.0)
dropbox (7.3.1)
enum34 (1.1.6)
ez-setup (0.9)
gitdb (0.6.4)
GitPython (0.3.2rc1)
gunicorn (19.7.1)
honcho (1.0.1)
httplib2 (0.10.3)
idna (2.5)
ipaddress (1.0.18)
Jinja2 (2.9.6)
markdown2 (2.3.4)
MarkupSafe (1.0)
meld3 (1.0.2)
MySQL-python (1.2.5)
paramiko (2.1.2)
pip (9.0.1)
psutil (5.2.2)
pyasn1 (0.2.3)
pycparser (2.17)
pycrypto (2.6.1)
PyMySQL (0.7.11)
python-crontab (2.2.2)
python-dateutil (2.6.0)
PyYAML (3.12)
requests (2.17.3)
semantic-version (2.6.0)
setuptools (36.0.1)
six (1.10.0)
smmap (0.9.0)
supervisor (3.3.1)
urllib3 (1.21.1)
virtualenv (15.1.0)
wheel (0.29.0)

Brew Install List


boost 1.64.0_1
dnsmasq 2.76 2.77_1
gcc 7.1.0
gdbm 1.13
git 2.13.0
gmp 6.1.2
highlight 3.38
icu4c 58.2
isl 0.18
libmpc 1.0.3_1
lua 5.2.4_4
mariadb 10.2.6
mariadb-connector-c 2.2.2
mpfr 3.1.5
nginx 1.12.0_1
node 8.0.0_1
openssl 1.0.2l
openssl@1.1 1.1.0f
pcre 8.40
python 2.7.13
readline 7.0.3_1
redis 3.2.9
sqlite 3.19.2
supervisor 3.3.2
tomcat 8.5.15

Unfortunately at the moment setting up a new ERPNext developer machine does not work with the Easy Install script nor with the instruction on manual installation that I wrote here. At the moment frappe framework doesn’t work on a clean macOS.

I have tried the setup on macOS Sierra 10.12.6 now on 2 different machines multiple times with clean setups. I always get stuck at bench init frappe-bench with the mysqlclient error.

There are several ideas here on how to resolve it in different discussion posts none of which works and plenty of which lead in the wrong way of some scary sudo commands and deletions.

We need some attention from somebody to fix the easy install script and the instruction of how to manually turn your Mac into a developer machine.

My error:

Command "/Users/dominik/Dev/frappe-bench/env/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/j0/2myy0yqd6cl8ft548hc1zvbc0000gn/T/pip-build-Y5PCYq/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/j0/2myy0yqd6cl8ft548hc1zvbc0000gn/T/pip-HrXafX-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/dominik/Dev/frappe-bench/env/bin/../include/site/python2.7/mysqlclient" failed with error code 1 in /private/var/folders/j0/2myy0yqd6cl8ft548hc1zvbc0000gn/T/pip-build-Y5PCYq/mysqlclient/

@dominik Please post the output of

pip install mysqlclient==1.3.10

Hi @saurabh6790 I already shared by email but here it is again:

Collecting mysqlclient==1.3.10
  Using cached mysqlclient-1.3.10.tar.gz
Building wheels for collected packages: mysqlclient
  Running setup.py bdist_wheel for mysqlclient ... error
  Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/wn/97m5_mc91szfx1hcfdzyvfcw0000gn/T/pip-build-9WR8GR/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/wn/97m5_mc91szfx1hcfdzyvfcw0000gn/T/tmpz9azeJpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.12-x86_64-2.7
  copying _mysql_exceptions.py -> build/lib.macosx-10.12-x86_64-2.7
  creating build/lib.macosx-10.12-x86_64-2.7/MySQLdb
  copying MySQLdb/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
  copying MySQLdb/compat.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
  copying MySQLdb/connections.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
  copying MySQLdb/converters.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
  copying MySQLdb/cursors.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
  copying MySQLdb/release.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
  copying MySQLdb/times.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
  creating build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/CR.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/ER.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
  running build_ext
  building '_mysql' extension
  creating build/temp.macosx-10.12-x86_64-2.7
  clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Dversion_info=(1,3,10,'final',0) -D__version__=1.3.10 -I/usr/local/Cellar/mariadb/10.2.8/include/mysql -I/usr/local/Cellar/mariadb/10.2.8/include/mysql/.. -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.12-x86_64-2.7/_mysql.o
  _mysql.c:29:10: fatal error: 'my_config.h' file not found
  #include "my_config.h"
           ^~~~~~~~~~~~~
  1 error generated.
  error: command 'clang' failed with exit status 1

  ----------------------------------------
  Failed building wheel for mysqlclient
  Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
  Running setup.py install for mysqlclient ... error
    Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/wn/97m5_mc91szfx1hcfdzyvfcw0000gn/T/pip-build-9WR8GR/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/wn/97m5_mc91szfx1hcfdzyvfcw0000gn/T/pip-JI3cJt-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.12-x86_64-2.7
    copying _mysql_exceptions.py -> build/lib.macosx-10.12-x86_64-2.7
    creating build/lib.macosx-10.12-x86_64-2.7/MySQLdb
    copying MySQLdb/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
    copying MySQLdb/compat.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
    copying MySQLdb/connections.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
    copying MySQLdb/converters.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
    copying MySQLdb/cursors.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
    copying MySQLdb/release.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
    copying MySQLdb/times.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb
    creating build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/CR.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/ER.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.12-x86_64-2.7/MySQLdb/constants
    running build_ext
    building '_mysql' extension
    creating build/temp.macosx-10.12-x86_64-2.7
    clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Dversion_info=(1,3,10,'final',0) -D__version__=1.3.10 -I/usr/local/Cellar/mariadb/10.2.8/include/mysql -I/usr/local/Cellar/mariadb/10.2.8/include/mysql/.. -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.12-x86_64-2.7/_mysql.o
    _mysql.c:29:10: fatal error: 'my_config.h' file not found
    #include "my_config.h"
             ^~~~~~~~~~~~~
    1 error generated.
    error: command 'clang' failed with exit status 1

    ----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/wn/97m5_mc91szfx1hcfdzyvfcw0000gn/T/pip-build-9WR8GR/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/wn/97m5_mc91szfx1hcfdzyvfcw0000gn/T/pip-JI3cJt-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/wn/97m5_mc91szfx1hcfdzyvfcw0000gn/T/pip-build-9WR8GR/mysqlclient/