镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

pip install pythonmonkey requires both sudo and apt-get #461

Open

Description

@themoonisacheese

Issue type

Build/Install

How did you install PythonMonkey?

Installed from pip

OS platform and distribution

AlmaLinux 8.10

Python version (python --version)

3.10

PythonMonkey version (pip show pythonmonkey)

N/A

Bug Description

In a fresh venv, running pip install pythonmonkey fetches dependencies, then tries building the wheel. This fails because it tries using sudo apt-get to install something (i'm unable to see what), but apt-get is not installed on my system, as the system package manager on fedora-flavored linux is yum or dnf.

Standalone code to reproduce the issue

python3 -m venv .venv
source .venv/bin/activate
pip install pythonmonkey

Relevant log output or backtrace

[several lines trucated]
Building wheels for collected packages: pythonmonkey
  Building wheel for pythonmonkey (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pythonmonkey (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [33 lines of output]
      Installing dependencies
      Installing apt packages
      sudo: apt-get : commande introuvable
[several more lines trucated]

Additional info if applicable

This is not localized to fedora-flavored systems. in fact, pretty much only ubuntu-flavored distributions still provide apt-get. Debian provides it as an alias to apt (because the functionality is identical), but you'll have the same problem with pacman on arch, and good luck with alpine and macos homebrew.

The problem is identical with sudo, where it's doas (from openBSD) on some distributions and who knows what else. Also, it's bad manners to do something as root during pip install. pip install shouldn't modify the system, and compromise to the package repo could result in several systems being owned for no good reason.

Let users install requirements that fall outside pip by themselves, and in the install instructions, simply list what is necessary.

What branch of PythonMonkey were you developing on? (If applicable)

No response

Activity

  1. lowpolyv2 commented on Dec 29, 2024

    @lowpolyv2

    I really don't understand why sudo is even needed in the first place when I'm installing in a virtual environment (venv). I've never seen a pypi package do this before. What's the reasoning behind this?

  2. szeitlin commented on Feb 25, 2025

    @szeitlin

    I'm also running into problems with the requirement for apt-get. We're trying to use this library on Amazon Linux so we can run our code in a Lambda. I'm also trying to come up with a solution that works for docker containers to be built and run on both apple silicon and linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions