Installation
NeuG runs on modern Linux and macOS systems with support for both x86 and ARM architectures. For Windows users, we recommend using WSL .
Python Setup Details
Requirements: Python 3.8 or later
Option 1: Direct Install
pip install neugOption 2: Using Virtual Environment (Recommended)
python3 -m venv neug-env
source neug-env/bin/activate
pip install neugOption 3: Alternative Sources
pip install neug -i https://mirrors.aliyun.com/pypi/simple/Verify Installation
import neug
# Test with in-memory database
db = neug.Database("")
conn = db.connect()
print("✅ NeuG is ready!")C++ Installation
Build from Source
See the Developer Guide for detailed build instructions. Quick overview:
git clone https://github.com/alibaba/neug.git
cd neug
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/neug # see CMakeLists.txt for more cmake options.
make -j$(proc)
make installVerify Installation
In your cmake project, find and link NeuG libraries with the following command:
cmake_minimum_required (VERSION 3.10)
project (
NeuGTest
VERSION 0.1
LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
find_package(neug REQUIRED)
add_executable(test test.cc)
include_directories(${NEUG_INCLUDE_DIRS})
target_link_libraries(test ${NEUG_LIBRARIES})A sample test.cc looks like:
#include <neug/main/neug_db.h>
#include <iostream>
int main() {
gs::NeugDB db;
db.Open("test_db");
auto conn = db.Connect();
std::cout << "NeuG C++ client installation successful!" << std::endl;
return 0;
}Build and run the test:
mkdir build && cd build
cmake .. -DCMAKE_PREFIX_PATH=/opt/neug
./testCommand Line Interface
The CLI tool is automatically included with the Python installation:
# Try it out
neug-cli --version
# Quick start with in-memory database
neug-cliSee CLI Documentation for more details.
Troubleshooting
Permission errors?
pip install --user neugImport errors?
pip install --upgrade neugNeed help? Visit our GitHub issues
Next Steps
🚀 Getting Started Guide - Your first graph database
📚 TinySnb Tutorial - Hands-on examples