Red fails to install on Python 3.11 #5994

Closed
opened 2023-03-04 14:19:58 +01:00 by Wayrion · 2 comments
Wayrion commented 2023-03-04 14:19:58 +01:00 (Migrated from github.com)

What Red version are you using?

red-discordbot 3.5.0.dev324+g2ab20443

What were you trying to do?

Install the dev version of Red on Ubuntu 22.04 with python 3.11.2 on Oracle Ampere free tier

What did you expect to happen?

Red to successfully install.

What actually happened?

Collecting psutil
Using cached psutil-5.9.4.tar.gz (485 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: psutil
Building wheel for psutil (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for psutil (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [45 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-cpython-311
creating build/lib.linux-aarch64-cpython-311/psutil
copying psutil/_compat.py -> build/lib.linux-aarch64-cpython-311/psutil
copying psutil/_pssunos.py -> build/lib.linux-aarch64-cpython-311/psutil
copying psutil/_psposix.py -> build/lib.linux-aarch64-cpython-311/psutil
copying psutil/init.py -> build/lib.linux-aarch64-cpython-311/psutil
copying psutil/_psaix.py -> build/lib.linux-aarch64-cpython-311/psutil
copying psutil/_pslinux.py -> build/lib.linux-aarch64-cpython-311/psutil
copying psutil/_psbsd.py -> build/lib.linux-aarch64-cpython-311/psutil
copying psutil/_psosx.py -> build/lib.linux-aarch64-cpython-311/psutil
copying psutil/_pswindows.py -> build/lib.linux-aarch64-cpython-311/psutil
copying psutil/_common.py -> build/lib.linux-aarch64-cpython-311/psutil
creating build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/init.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/main.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/test_memleaks.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/runner.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/test_testutils.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-aarch64-cpython-311/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-aarch64-cpython-311
creating build/temp.linux-aarch64-cpython-311/psutil
aarch64-linux-gnu-gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=594 -DPy_LIMITED_API=0x03060000 -DPSUTIL_LINUX=1 -I/home/ubuntu/redenv/include -I/usr/include/python3.11 -c psutil/_psutil_common.c -o build/temp.linux-aarch64-cpython-311/psutil/_psutil_common.o
psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
9 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psutil
Failed to build psutil
ERROR: Could not build wheels for psutil, which is required to install pyproject.toml-based projects

How can we reproduce this error?

  1. Install python 3.11
  2. Make a 3.11 venv
  3. Run pip install -U git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=Red-DiscordBot

Anything else?

From the error it appears that psutil fails to install, causing the installation to fail.

### What Red version are you using? red-discordbot 3.5.0.dev324+g2ab20443 ### What were you trying to do? Install the dev version of Red on Ubuntu 22.04 with python 3.11.2 on Oracle Ampere free tier ### What did you expect to happen? Red to successfully install. ### What actually happened? Collecting psutil Using cached psutil-5.9.4.tar.gz (485 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: psutil Building wheel for psutil (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for psutil (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [45 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-aarch64-cpython-311 creating build/lib.linux-aarch64-cpython-311/psutil copying psutil/_compat.py -> build/lib.linux-aarch64-cpython-311/psutil copying psutil/_pssunos.py -> build/lib.linux-aarch64-cpython-311/psutil copying psutil/_psposix.py -> build/lib.linux-aarch64-cpython-311/psutil copying psutil/__init__.py -> build/lib.linux-aarch64-cpython-311/psutil copying psutil/_psaix.py -> build/lib.linux-aarch64-cpython-311/psutil copying psutil/_pslinux.py -> build/lib.linux-aarch64-cpython-311/psutil copying psutil/_psbsd.py -> build/lib.linux-aarch64-cpython-311/psutil copying psutil/_psosx.py -> build/lib.linux-aarch64-cpython-311/psutil copying psutil/_pswindows.py -> build/lib.linux-aarch64-cpython-311/psutil copying psutil/_common.py -> build/lib.linux-aarch64-cpython-311/psutil creating build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/test_system.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/test_unicode.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/test_contracts.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/test_connections.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/test_posix.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/test_process.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/__init__.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/test_linux.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/test_sunos.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/__main__.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/test_misc.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/test_memleaks.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/runner.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/test_bsd.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/test_testutils.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/test_osx.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/test_aix.py -> build/lib.linux-aarch64-cpython-311/psutil/tests copying psutil/tests/test_windows.py -> build/lib.linux-aarch64-cpython-311/psutil/tests running build_ext building 'psutil._psutil_linux' extension creating build/temp.linux-aarch64-cpython-311 creating build/temp.linux-aarch64-cpython-311/psutil aarch64-linux-gnu-gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=594 -DPy_LIMITED_API=0x03060000 -DPSUTIL_LINUX=1 -I/home/ubuntu/redenv/include -I/usr/include/python3.11 -c psutil/_psutil_common.c -o build/temp.linux-aarch64-cpython-311/psutil/_psutil_common.o psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory 9 | #include <Python.h> | ^~~~~~~~~~ compilation terminated. error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for psutil Failed to build psutil ERROR: Could not build wheels for psutil, which is required to install pyproject.toml-based projects ### How can we reproduce this error? 1. Install python 3.11 2. Make a 3.11 venv 3. Run pip install -U git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=Red-DiscordBot ### Anything else? From the error it appears that psutil fails to install, causing the installation to fail.
Jackenmen commented 2023-03-04 15:15:58 +01:00 (Migrated from github.com)

a) Our install instructions tell you to use Python 3.10 on Ubuntu 22.04, not Python 3.11
b) You're missing Python development headers, which our install instructions include in the list of packages to install (python3.10-dev package).

a) Our install instructions tell you to use Python 3.10 on Ubuntu 22.04, not Python 3.11 b) You're missing Python development headers, which our install instructions include in the list of packages to install (`python3.10-dev` package).
madebylydia commented 2023-03-04 15:20:32 +01:00 (Migrated from github.com)

I'd like to add that even if Python 3.11 is not supported yet, I was told that installing python3.11-dev could fix it, however I also had a build problem even when installing it.
I was able to resolve it when setting SETUPTOOLS_USE_DISTUTILS to stdlib (Giving SETUPTOOLS_USE_DISTUTILS=stdlib python3.11 -m pip install psutil)

I'd like to add that even if Python 3.11 is not supported yet, I was told that installing `python3.11-dev` could fix it, however I also had a build problem even when installing it. I was able to resolve it when setting `SETUPTOOLS_USE_DISTUTILS` to `stdlib` (Giving `SETUPTOOLS_USE_DISTUTILS=stdlib python3.11 -m pip install psutil`)
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#5994
No description provided.