-2

I'm facing some compatibility issues while installing AGE. I have installed PostgreSQL, specified version in the instructions, however, installation via pip is giving an error of version mismatch.

I have carefully followed the installation instructions but still encountering issues. Any help in this regard would be really appreciated.

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
  • 2
    Please, specify your AGE and SO environment and the instructions you are following. Paste the terminal log will also help us to give better answers to solve your problem. And maybe the answer is here in this question: https://stackoverflow.com/q/76155385/12764936. – Carla May 09 '23 at 15:00

12 Answers12

1

Make sure python3 is installed correctly and whether postgres version you are using is compatible with APACHE AGE.

Aadil Bashir
  • 111
  • 5
0

I would recommend delete all of installation and then do it again. To detect error it will be difficult follow one guide and take it to end. On which system OS, MAC , linux you are installing.

Follow this guide link to source for installing

if not then post screenshot what problem you are facing

farrukh raja
  • 187
  • 4
0

Consider updating both your PostgreSQL database and Apache AGE installation to ensure that they are using the latest versions available and are compatible with each other. You can follow these commands:

sudo apt-get upgrade
sudo apt install postgresql-15 postgresql-server-dev-15

another alternative is do it manually, you can reach it out on PostgreSQL and install it by yourself. Very important to verify versions of the clusters running in your machine.

Marcos Silva
  • 115
  • 5
0

make sure you have python 3.0 installed to check write this command:

python --version

if not installed follow these steps:

    sudo apt update
sudo apt install python3
python3 --version
sudo apt install python3-pip
sudo pip3 install numpy

sudo apt install build-essential

git clone https://github.com/apache/age.git myage
cd myage/drivers/python
pip install -r requirements.txt

pip install -r requirements.txt

Also make sure pg11-12-13 is installed

0

Compatibility issues cannot be checked with this information. You need to share more information or you can follow this tutorial.

You need to follow the commands in this pattern to install apache age successfully.

mkdir age_installation
cd age_installation
mkdir pg
cd pg

# You need to install these dependencies:
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison


# Installing Postgresql
sudo apt install postgresql-server-dev-11
wget https://ftp.postgresql.org/pub/source/v11.18/postgresql-11.18.tar.gz && tar -xvf postgresql-11.18.tar.gz && rm -f postgresql-11.18.tar.gz
cd postgresql-11.18

# configure by setting flags
./configure --enable-debug --enable-cassert --prefix=$(pwd) CFLAGS="-ggdb -Og -fno-omit-frame-pointer"

# now install
make install

# go back
cd ../../

# Configure those debugging flags
./configure --enable-debug --enable-cassert --prefix=$(pwd) CFLAGS="-glldb -ggdb -Og -g3 -fno-omit-frame-pointer"

git clone https://github.com/apache/age.git
cd age/

# install
sudo make PG_CONFIG=/home/imran/age_installation/pg/postgresql-11.18/bin/pg_config install

# install check
make PG_CONFIG=/home/imran/age_installation/pg/postgresql-11.18/bin/pg_config installcheck


cd postgresql-11.18/

# initialization
bin/initdb demo


bin/pg_ctl -D demo -l logfile start
bin/createdb demodb

bin/psql demodb
If your server is running on some other port, use this command

bin/createdb --port=5430 demodb

CREATE EXTENSION age;
LOAD 'age';
SET search_path = ag_catalog, "$user", public;

# you can give your customized queries after that

#Now for installing AGE-viewer
sudo apt install nodejs npm
git clone https://github.com/apache/age-viewer.git
cd age-viewer

npm run setup
npm run start


# Now update your customized settings. Like in my case:
url: localhost;

port: 5432;

username: waleed;

# radom pass as password is not set for this user.
pass: 1234;

dbname: demodb;

# Apache age viewer can be shown after that. you can give your queries after that.

Now, in this step, you need to make sure that you have installed each dependency and that everything has been installed perfectly fine. If some dependency like flex, bison or pgsql hasn't been installed correctly then you need to install that perfect first and then the next thing will install.

For installation: See this article

0

Installing dependencies:

First, we are going to install age For that make a new directory and a sub-directory:

mkdir age_installation
cd age_installation
mkdir pg
cd pg

Download some important libraries by using the below commands before starting the process of installation of Apache Age. Since we are specifically using Linux to install the apache age, we will be using the below commands.

Remember below commands might vary according to the operating systems.

sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison

Now considering you have already installed postgreSQL on your machine. Follow below steps for installation of age.

AGE:

Downloading:

Download the age from the GitHub repository. i.e. clone it in the age_installation directory.

git clone https://github.com/apache/age.git

Installing:

Configure age with PostgreSQL.

cd age/
sudo make PG_CONFIG=/home/talhastinyasylum/Desktop/age_installation/pg/postgresql-11.18/bin/pg_config install
make PG_CONFIG=/home/talhastinyasylum/Desktop/age_installation/pg/postgresql-8/bin/pg_config installcheck

In the above commands, PG_CONFIG requires the path to the pg_config file. The second command will check whether the installation was successful or not.

At the end of the check command, you will receive a message saying all tests passed.

Image description

You can check the part 2 of this article testing of PostgreSQL and Apache-age here part 2.

References:

You can take help from following links they helped me in installing as well:

  1. https://github.com/git-guides/install-git
  2. https://age.apache.org/age-manual/master/intro/setup.html
  3. https://www.postgresql.org/docs/current/install-procedure.html
Talha Munir
  • 121
  • 5
0

Make sure that your version of postres is compatible with apache age. Currently only postgres 11, and 13 are compatible with age. And check to see if python3 is installed correctly.

0

Try using pip3 command to install. When there are multiple installations of python, pip installs the package for python 2. This can be a possible reason for the version mismatch. I would also advise to create a python environment with required version and install all packages there instead of installing globally.

abhishek2046
  • 312
  • 1
  • 11
0

The information is not sufficient to suggest a specific solution. But if you want to install Apache AGE with the most suitable method, you can follow the steps below.

Select a version you want to use for either postgresql or age. Then find the compatible version for the other one.

Let's assume you are going with PostgreSQL 12, then you should choose from the versions of AGE compatible with PG12.

Next, install Postgresql 12 using source code followed by AGE using similar method.

Note that this is only one way to install AGE, you can opt for others.

For installation using source code, here's a good tutorial you can follow:

youtube.com/watch?v=0-qMwpDh0CA&ab_channel=비트나인Bitnine

0

In your question you havent specified your OS or postgresql version, that creates a lot of confusion. Right now AGE is working for postgresql 11 and 12 according to official documentation. If you are using Ubuntu i suggest you use version 11.18 of postgresql. Install your dependencies

sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison

Then run this command to get version 11.18

wget https://ftp.postgresql.org/pub/source/v11.18/postgresql-11.18.tar.gz && tar -xvf postgresql-11.18.tar.gz && rm -f postgresql-11.18.tar.gz

Now to configure and install

./configure --enable-debug --enable-cassert --prefix=$(path) CFLAGS="-ggdb -Og -fno-omit-frame-pointer"

make install

There isn't anyway to install postgresql from source code and AGE on windows so you can just use wsl and follow the same steps. Then if you are having issues with your python version make sure you have python 3 installed

python --version

check your python version using this

0

Make sure you have installed up to date versions of Apache AGE and PostgreSQL database and they are also compatible with each other. Use the following commands to update:

sudo apt-get upgrade
sudo apt install postgresql-15 postgresql-server-dev-15

You have also option to perform a update manually. However, versions of the clusters running on your machine must be verified.

-1

If you want to install Apache AGE to use with Python, you need first to install Apache AGE following the steps in the documentation and then follow the instructions to install the python driver according to your Apache AGE version.

The PostgreSQL versions supported are 11, 12, and 13 so far. Make sure you installed both postgresql and postgresql-server-dev or libpq-dev.

The easiest way to install Apache AGE is from the source code. Here is an example to install Python driver for PostgreSQL 13 with Apache AGE 1.3.0:

sudo apt-get update
sudo apt-get install python3-dev libpq-dev
git clone https://github.com/apache/age.git
cd age/drivers/python
pip install -r requirements.txt
Carla
  • 326
  • 1
  • 7