install from IDLE, not OS

2525 views
Skip to first unread message

pca

unread,
Apr 26, 2012, 4:06:54 AM4/26/12
to python-v...@googlegroups.com
As a developer of a python module called pyDatalog, I find the installation of modules by end-user frustratingly complex.  One reason is that installation instructions currently need to be OS dependent.  A solution to that issue would be to let users install module by using IDLE, not their OS.  Indeed, IDLE is the same on all OS.  

Users would :
* start IDLE of the python they want to install the module in
* import an installation module, e.g import pip
* execute a python command to install the desired module : pip('install', 'pyDatalog')
* restart IDLE to take advantage of the new module

Has this been considered before ? A search of 'IDLE' on this list did not bring anything.  Is this technically possible ? Any comments welcome.
 PCA

Thomas Kluyver

unread,
May 30, 2012, 3:18:19 PM5/30/12
to python-v...@googlegroups.com
+1 - I've thought for a while that it would be nice to be able to install packages from inside Python. Another major selling point is for novice users, especially on Windows, who may not be comfortable with the system command line. In R, the default method of installing packages is a built-in install.package() function, and I think it does make it much easier for new programmers to understand.

Thomas

pca

unread,
Nov 1, 2012, 3:40:40 PM11/1/12
to python-v...@googlegroups.com
Thank you Thomas.  I wish someone would hear our voices...

pca

unread,
Dec 17, 2012, 10:57:26 AM12/17/12
to python-v...@googlegroups.com
I found a way to do it !

in idle, type the following code :

from subprocess import call
call("pip install pyDatalog", shell=True) # install a package

You need to have pip installed.
PC

Nicolas SCHMIT

unread,
Feb 7, 2019, 3:56:04 PM2/7/19
to virtualenv
It's 2019 now and it seems you still have to use a command prompt to install a package you'll use in IDLE
Reply all
Reply to author
Forward
0 new messages