ERPnext Fresh Setup to MacOs - Common Problems

Hello ppl of ERPnext and Frappe. Before I make my question let my clarify

  1. I have made my research through forum and tried to find solution. The solutions aren’t complete and vague from unexperienced users (Please if you read this topic, do not answer something that might think is right. Newcomers can’t evaluate your answer)
  2. I need to setup Frappe for Mac OS and no I dont wan’t use the provided vagrant file.
  3. I have priori experience in Python and db management with command line.

So, the question,

How to setup EPRNext in a fresh Mac os using the official documentation?

Assuming brew and brew cask is installed, the documentation states:

  1. Python 2.7 (brew install python)
  2. Mariadb ( Official guide and also mysqladmin -uroot password ROOTPASSWORD
    and brew services start mariadb to start it)
  3. Redis (brew install redis)
  4. WKHTMLtoPDF with patched QT ('brew cask installl WKHTMLtoPDF ')

Then:
git clone https://github.com/frappe/bench bench-repo
sudo pip install -e bench-repo

Anyway, so far for good,
Now ERPNext,

bench init frappe-bench && cd frappe-bench
bench get-app erpnext https://github.com/frappe/erpnext
bench new-site site1.local # Create a new site

AND BOMB!!! error, … Mariadb my.cnf must setup
Now, if someone search in the forum will find many ppl faceing the same,
Why developer aren’t clarifying the setup process ?
How the hell we donna work to ERP when setup doesn’t work?
Why in the tutorial video the creators are using Frappe with a Mac …not vagrant… and no proper setup guides are provided?

Try to solve this:
sudo cp /usr/local/Cellar/mariadb/10.1.13/support-files/my-small.cnf /etc/my.cnf
I taking the official small.cnf from Mariadb to /etc/my.cnf , the default location for my version as Mariaddb will search for.

brew services stop mariadb
brew services start mariadb

Running again: bench new-site site1.local and BOMB, database exists. Thats no problem,
mysql -u root -p , SHOW DATABASES; , DROP DATABASE #$342342;, EXIT;

Running again: bench new-site site1.local and BOMB, Mariadb my.cnf must setup…

Reading around: changed also developer_mode:1 and restart mariadb and BOMB,
database exists…

As you see I have a beautiful error circle…

So guys, can anyone tell that Frappe needs to setup a single site without bench command?
Is there a clear guide that I miss?

Stavros (kickapoo)

@anand and @rmehta and @vjFaLk this is vis-a-vis the problems I am encountering at the moment described at No module named frappe.celery_app and seen in person by @vjFaLk in a teamviewer session a few minutes ago.

My first problem that I encountered was that only after bench new-site site1.local was run it first would not accept an empty root password but didnt really say so. I just found that out through trial and error. Then after mysql_secure_installation the next run of bench new-site site1.local threw a nice message telling me to update my my.cnf but still somehow inserted stuff into the database. I updated the my.cnf but then running bench new-site site1.local a third time I had to delete the existing database table. So far that was no big problem so I did and bench new-site site1.local worked only after the 4th attempt.

Well only until I realized that when doing a setup the manual way instead of checking out master of frappe and erpnext it does check out the develop branch which means bench start fails with No module named frappe.celery_app.

I want an instruction that is tested and that allows me to install bench, frappe and erpnext on my macbook so I can develop my own software based on the master branch which is tested by you guys. Unfortunately both I and @kickapoo failed miserably at this all day and we are going into a weekend quite frustrated.

FYI @emakis, me and @kickapoo all did a clean install of our macbooks to prevent any mess up in the past or some crappy sudo installs from having a clean erpnext. We have nicely installed clean systems, installed xterm and then everything was added through brew and brew cask (iterm2, atom, zsh, python, python3, git, node, npm, redis, mariadb, wkhtmltopdf).

All was good until we installed according to the manual and trust me we dont want to run an automated install script now being worried about what may happen.

What are we missing or messing up?

@kickapoo @dominik

The develop branch is in flux right now and hence you are facing these issues. See: [develop branch] Celery deprecated. Long live Python RQ

For MacOS X installation use this: https://github.com/frappe/bench#development-setup-beta. It will install the develop setup which is the ongoing frappe 7 development. Although there might be bugs, we are fixing them as fast as we can. We are using it live for our ERPNext account.

If you wish to run it for production, make sure all your branches are ‘master’ i.e. for bench-repo, frappe and erpnext

Unfortunately, git provided by the recent MacOSX breaks shallow clones. So, do a brew install git before you clone anything.

Thank you @anand for replying so quickly. We have git installed from brew. brew install git --> Warning: git-2.8.1 already installed.

The thing is that I am a bit worried about what the script may automatically install and how it does it. I have all prerequisites installed through brew. I would also like to control where my frappe-bench lives etc.

@kickapoo for manual setup of mariadb, you need to know where the my.cnf file is supposed to be placed, which is /usr/local/etc/my.cnf.d/frappe.cnf

If you don’t want these hassles, use the beta installer and it should work. We have installed a few mac osx benches and it has worked so far.

@kickapoo for me this issue was resolved when I edited the /usr/local/etc/my.cnf file according to the setup instructions that are given when it breaks the first time. I believe if you edit /usr/local/etc/my.cnf by adding

[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4

to that file.

Then when you are done you have to switch to develop branch in bench-repo by following the instructions given by @vjFaLk here No module named frappe.celery_app

OR you can install everything according to the instruction from @anand by following No module named frappe.celery_app to always check out master instead of develop.

1 Like