matplotlib / matplotlib/matplotlib

[Bug]: install in development mode fails

Đang mở
#30,038 9 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Python
Star
23.2k
Fork
8.5k
Merge trung bình
1 ngày 6 giờ
Pull request đã merge (30 ngày)
66

Mô tả

### Bug summary

I'm trying to install matplotlib in development mode for a PR, and I'm using this for installing it in dev mode (from [here](https://matplotlib.org/devdocs/devel/development_setup.html#install-matplotlib-in-editable-mode)):

```bash
python -m pip install --verbose --no-build-isolation --editable ".[dev]"
```

I've tried all the basic stuffs (removing/re-creating the venv, etc), but I don't understand the error.

### Code for reproduction

Right after I git cloned and cd matplotlib:

```Python
python -m venv venv
source venv/bin/activate
pip install -r requirements/dev/dev-requirements.txt
pip install -r requirements/doc/doc-requirements.txt
pip install -r requirements/testing/all.txt
python -m pip install --verbose --no-build-isolation --editable ".[dev]"
```

### Actual outcome

Using pip 22.0.4 from /Users/josephbarbier/Desktop/matplotlib/venv/lib/python3.10/site-packages/pip (python 3.10)
Obtaining file:///Users/josephbarbier/Desktop/matplotlib
Running command Checking if build backend supports build_editable
Checking if build backend supports build_editable ... done
Running command Preparing editable metadata (pyproject.toml)
+ meson setup /Users/josephbarbier/Desktop/matplotlib /Users/josephbarbier/Desktop/matplotlib/build/cp310 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/Users/josephbarbier/Desktop/matplotlib/build/cp310/meson-python-native-file.ini
The Meson build system
Version: 1.8.0
Source dir: /Users/josephbarbier/Desktop/matplotlib
Build dir: /Users/josephbarbier/Desktop/matplotlib/build/cp310
Build type: native build
Program python3 python found: NO found 3.10.5 but need: '>= 3.11'

../../meson.build:6:4: ERROR: Program 'python3 python' not found or not executable

A full log can be found at /Users/josephbarbier/Desktop/matplotlib/build/cp310/meson-logs/meson-log.txt
error: subprocess-exited-with-error

× Preparing editable metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /Users/josephbarbier/Desktop/matplotlib/venv/bin/python /Users/josephbarbier/Desktop/matplotlib/venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_editable /var/folders/m2/jfzxyg4s0xz3jyw5f94r7tcm0000gn/T/tmpwu3byzgi
cwd: /Users/josephbarbier/Desktop/matplotlib
Preparing editable metadata (pyproject.toml) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

### Expected outcome

Successfully install matplotlib in development mode.

### Additional information

- I'm not sure why I have this version of Python installed here

- I tried with pip latest (25.1.1), and it doesn't change anything

- `meson-log.txt`

Build started at 2025-05-11T19:18:42.156591
Main binary: /Users/josephbarbier/Desktop/matplotlib/venv/bin/python
Build Options: -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/Users/josephbarbier/Desktop/matplotlib/build/cp310/meson-python-native-file.ini
Python system: Darwin
The Meson build system
Version: 1.8.0
Source dir: /Users/josephbarbier/Desktop/matplotlib
Build dir: /Users/josephbarbier/Desktop/matplotlib/build/cp310
Build type: native build
Running command: /Users/josephbarbier/Desktop/matplotlib/venv/bin/python --version
--- stdout ---
Python 3.10.5

--- stderr ---

Program python3 python found: NO found 3.10.5 but need: '>= 3.11'

../../meson.build:6:4: ERROR: Program 'python3 python' not found or not executable

### Operating system

MacOS Sequoia 15.4.1

### Matplotlib Version

3.10.3

### Matplotlib Backend

macosx

### Python version

Python 3.10.5

### Jupyter version

_No response_

### Installation

pip

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với meson.build ở dòng 6 và hướng dẫn thiết lập môi trường phát triển được liên kết trong issue, sau đó tái hiện editable installation bằng môi trường Python 3.10 được báo cáo. Kiểm tra cách yêu cầu về phiên bản Python được truyền đạt hoặc thực thi; được xem là hoàn tất khi thiết lập phát triển được hỗ trợ là rõ ràng và editable installation thành công với các điều kiện tiên quyết được ghi chép.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
macos, python
Lĩnh vực
build-system
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.