Skip to content

Commit

Permalink
Handling PIP Memory Error.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwthm-in committed Dec 8, 2016
1 parent 3fdf5bd commit 0e55629
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion superset/templates/appbuilder/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/superset/profile/{{ current_user.username }}/">
<img width="100" src="/static/assets/images/superset.png" style="padding-top: 2px;" alt="Superset">
<img width="100" src="{{ appbuilder.app.config.get('APP_ICON')}}" style="padding-top: 2px;" alt="Superset">
</a>
</div>
<div class="navbar-collapse collapse">
Expand Down
25 changes: 20 additions & 5 deletions superset_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
sudo_pass = getpass.getpass("Please enter sudo password: ")

UBUNTU_CMDS = { "install_dependencies":
"apt-get install build-essential libssl-dev libffi-dev python-dev python-pip libsasl2-dev libldap2-dev",
"apt-get install build-essential libssl-dev libffi-dev python-dev python-pip libsasl2-dev libldap2-dev libmysqlclient-dev",
"pip_update":
"pip install --upgrade setuptools pip",
"superset_install":
Expand Down Expand Up @@ -150,7 +150,13 @@ def nginx_config():
def general_config():
# Installing general pip dependencies
mylog.log("INFO", "Installing few python dependencies")
command_center("pip install celery redis mysql-python")
try:
command_center("pip install celery redis mysql-python", exit_on_fail=False)
except MemoryError:
command_center("pip install celery redis mysql-python --no-cache-dir")
else:
mylog.log("ERROR", "Machine MYSQL path is not configured properly.")
mylog.log("INFO", "Configure and run pip install mysql-python.")

# Getting superset_config.py file.
mylog.log("INFO", "Setting up external superset_config file.")
Expand Down Expand Up @@ -213,7 +219,10 @@ def ubuntu_installation():
command_center(UBUNTU_CMDS['pip_update'])

# Install superset
command_center(UBUNTU_CMDS['superset_install'])
try:
command_center(UBUNTU_CMDS['superset_install'], exit_on_fail=False)
except MemoryError:
command_center(UBUNTU_CMDS['superset_install'] + ' --no-cache-dir')

# General config.
mylog.log("INFO", "Installing Superset is done..!")
Expand All @@ -235,7 +244,10 @@ def centos_installation():
command_center(CENTOS_CMDS['pip_update'])

# Install superset
command_center(CENTOS_CMDS['superset_install'])
try:
command_center(CENTOS_CMDS['superset_install'], exit_on_fail=False)
except MemoryError:
command_center(CENTOS_CMDS['superset_install'] + ' --no-cache-dir')

# General config.
mylog.log("INFO", "Installing Superset is done..!")
Expand All @@ -257,7 +269,10 @@ def apple_installation():
command_center(DARWIN_CMDS['pip_update'])

# Install superset
command_center(DARWIN_CMDS['superset_install'])
try:
command_center(DARWIN_CMDS['superset_install'], exit_on_fail=False)
except MemoryError:
command_center(DARWIN_CMDS['superset_install'] + ' --no-cache-dir')

mylog.log("INFO", "Hurrah! Installation Done Successfully..!")
mylog.log9("WARN", "Automatic configuring superset is not available for OS X due to System Integrity Protection (rootless)")
Expand Down

0 comments on commit 0e55629

Please sign in to comment.