DAMO-NLP-SG / DAMO-NLP-SG/VideoLLaMA3

Fix dependency installation issues with Python 3.12

Open
#95 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
1.2k
Forks
89
PR merge metrics
No merged PRs in 30d

Description

This report details the resolution of several dependency installation issues encountered when setting up the project with Python 3.12.

### 1. NumPy Build Failure

**Problem:**
When running `pip install .`, the installation failed during the build of `numpy==1.24.4` with the following error:
```
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Cannot import 'setuptools.build_meta'
```

**Solution:**
This issue was resolved by upgrading the `numpy` dependency to a version compatible with Python 3.12. The `numpy` version was changed from `1.24.4` to `1.26.0` in both `pyproject.toml` and `requirements.txt`.

### 2. SentencePiece Build Failure

**Problem:**
After resolving the `numpy` issue, the installation failed again during the build of `sentencepiece==0.1.99`. The error indicated a problem with `cmake`:
```
Package 'sentencepiece', required by 'virtual:world', not found
CMake Error at CMakeLists.txt:15 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
```

**Solution:**
This was fixed by upgrading `sentencepiece` to version `0.2.0`, which provides a pre-compiled wheel for Python 3.12 and doesn't require a local build with `cmake`. The change was made in both `pyproject.toml` and `requirements.txt`.

With these two changes, the `pip install .` command now completes successfully.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.