0

A Python embeddable package can install pip separately (pip with embedded python), but can it also install IDLE separately? As the embeddable package has pythonw.exe already, I tried to externally load idle.pyw with it, but more seem to be needed.

Junyong Kim
  • 279
  • 1
  • 2
  • 10
  • Wouldn't the `idle` package be treated like any other package that a particular application depends upon? That is, wouldn't you cause it to be included in an embedded Python just like any other dependent package? You say that "more seems to be needed", but as the `idle` package is pure Python, it will only have transitive dependencies like any other package might have. I've always figured that `pip` is a special case because it is what is used to install dependent packages, and so it can't be treated like just another dependent package. The `idle` package doesn't suffer from this shortcoming. – CryptoFool Nov 13 '22 at 06:20
  • Yes; the embeddable package can install ```pip```, and ```pip install idle``` can install ```idle``` in turn, but ```import idle``` in ```python.exe``` prompt returns ```ModuleNotFoundError: No module named 'layout'```. – Junyong Kim Nov 13 '22 at 06:39
  • Hmmm...strange. I would think that `pip install idle` would handle getting the transient dependencies installed even for an embedded Python. – CryptoFool Nov 13 '22 at 07:15

1 Answers1

0

The IDLE IDE is part of the CPython standard library. It is usually an option packaged with tkinter, _tkinter, and, on Windows and Mac, an appropriate version of tcl/tk. Unless embedded Python comes with tkinter and _tkinter and tcl/tk is available, installing IDLE would be useless as well as difficult. It is not available as a separate package on pypi.org. (There are a couple of packages, such as https://pypi.org/project/friendly-idle/ that wrap or extend already installed IDLE.)

https://pypi.org/project/idle/ is a useless, non-functional, pretend package. "This is a program written in tkinter which acts as text editor.This can be used to edit file and as alternative of notepad." is a complete fiction. py -m pip install idle installs a 26-line idle.py. As reported in a comment, it tries to import a fictional module 'layout'. It later tries to run a fictional 'gui.mainloop()'.

Terry Jan Reedy
  • 18,414
  • 3
  • 40
  • 52