Install Gramex

There are 4 ways of installing or upgrading the Gramex Community Edition.

  1. Conda (RECOMMENDED). Best for beginners and Python developers
  2. Docker. Best to try out new versions, or to deploy apps
  3. Pip. Best for people contributing to Gramex
  4. Offline. Best for machines without an Internet connection

Conda install

Install Anaconda3-2020.02. (Gramex does not yet work with Python 3.8. So avoid later versions). Here are downloads for:

To install gramex, type this in your Anaconda Prompt / shell:

conda create -y --name gramex python=3.7            # Create a new environment
conda activate gramex                               # Activate it
conda install -y -c conda-forge -c gramener gramex  # Install Gramex

Run gramex --help to verify that Gramex is installed.

Upgrade Gramex via conda

To upgrade Gramex, run:

conda update gramex

Docker install

Install Docker first.

Once Docker is running, to run gramex, type this in your Command Prompt / Terminal / shell:

docker run -it --name gramex -p 9988:9988 gramener/gramex /bin/bash

Run gramex --help to verify that Gramex is installed.

Upgrade Gramex via docker

To upgrade Gramex, run:

docker pull gramener/gramex

Pip install

  1. Install Anaconda3-2020.02. (Gramex does not yet work with Python 3.8. So avoid later versions). Here are downloads for: - Windows-x86_64 - Windows-x86 - MacOSX-x86_64 - Linux-x86_64 - Linux-ppc64le
  2. Install node.js 10 or later
  3. Run the following commands on the terminal
pip install gramex      # Install latest version of Gramex
npm install -g yarn     # Required for UI components and built-in apps
gramex setup --all      # Set up UI components and built-in apps

Run gramex --help to verify that Gramex is installed.

You can also install specific versions or tags of Gramex:

# Install a specific version of Gramex
pip install --verbose gramex==1.47.0

# Install a specific branch or tag from the Gramex source code
pip install --verbose https://github.com/gramener/gramex/archive/dev.zip
pip install --verbose https://github.com/gramener/gramex/archive/v1.47.0.zip

If you’re developing on Gramex, clone it and install a local version:

git clone https://github.com/gramener/gramex.git
pip install --verbose -e gramex

Upgrade Gramex via pip

To upgrade Gramex, run:

pip install --upgrade gramex
gramex setup --all

Troubleshooting

If Gramex does not install:

If Gramex does not run:

Offline install

On a system with an Internet connection and the same platform (Windows/Linux) as the target system:

  1. Create a folder called offline
  2. Download Anaconda into offline
  3. In the offline folder, run pip download gramex or pip download gramexenterprise if you need enterprise features.

If you are behind a HTTP proxy, use pip download --proxy=http://{proxy-host}:{port} ....

Copy the offline folder to the target machine (which need not have an Internet connection). Then:

  1. Install the Anaconda executable. When prompted, say “Install for all users”, not “Just me”
  2. Open the Command Prompt or terminal as administrator. From the offline folder, run - For open-source gramex version pip install --verbose --no-index --find-links . gramex-XYZ.tar.gz - Or, for gramex enterprise pip install --verbose --no-index --find-links . gramexenterprise-XYZ.tar.gz

Note:

Offline Docker Install

Install Docker on a system with an Internet connection and the same platform (Windows/Linux) as the target system. Then run:

docker pull gramener/gramex
docker save gramener/gramex > gramex-latest.tar

Then:

  1. Copy files to the target machine.
  2. Install Docker on the target machine.
  3. Copy gramex-latest.tar to the target machine. Zip and split it if required.

On the target machine, run:

docker load < gramex-latest.tar
docker run -it --name gramex -p 9988:9988 gramener/gramex /bin/bash

Install Gramex Enterprise

Gramex Enterprise is offered under a commercial license and provides enterprise security features.

To install it, install Gramex first.

Then run:

pip install gramexenterprise    # Install Gramex Enterprise
gramex license accept           # Accept the Gramex license

Upgrade Gramex Enterprise

To upgrade Gramex Enterprise, run:

pip install --upgrade gramexenterprise

VSCode Extension

Install Gramex Snippets extension for VSCode IDE for Gramex related code snippets. Visit VSCode Extension page for more details.