I am looking to install an IDE for Python. I am working on a VM with a Python version of 2.7.5, and under CentOS7.
I am trying to install it on the command line under my terminal.
For now I only found commands with "apt-get"
..
When I try yum install idle-python2.7
, I get this:
No python3-tools package available.
And when I try "yum install python-tools", I get this as an error:
[root@nexus-chat1 ~]# idle
Traceback (most recent call last):
File "/usr/bin/idle", line 5, in <module>
main()
File "/usr/lib64/python2.7/idlelib/PyShell.py", line 1507, in main
root = Tk(className="Idle")
File "/usr/lib64/python2.7/lib-tk/Tkinter.py", line 1745, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
Or do you know of other IDEs for Python that I could easily install?
You are right that idle
is provided by package python-tools
on CentOS 7.
And based on your description, it seems that the package is installed properly. You can verify that by running:
# rpm -q python-tools
python-tools-2.7.5-58.el7.x86_64
The error you see when you try to run it is caused by the fact that idle
is a gui application, and you are likely connected via ssh without X forwarding enabled.