17

"Python Xlib" (http://pypi.python.org/pypi/Python%20Xlib) is a low level python library for working with xlib. I have installed it on my Ubuntu Linux machine via apt, i.e. sudo aptitude install python-xlib. However is it possible to install it with pip in a virtualenv? I am writing a software package that uses xlib, and would like to be able to include an install_requires line in my setup.py.

Since the package is on PyPI (and appears in results of pip search xlib), I tried to pip install … the following package names but nothing worked: python\ xlib, python-xlib, Python Xlib, Python-Xlib, Python%20Xlib, but none worked.

Is it possible to install python xlib with pip?

Benjamin Loison
  • 3,782
  • 4
  • 16
  • 33
Amandasaurus
  • 58,203
  • 71
  • 188
  • 248
  • pip install python-xlib – TomDLT Jul 28 '17 at 13:02
  • [Can I ask questions about installation in SO?](https://meta.stackoverflow.com/questions/338203/can-i-ask-questions-about-installation-in-so) Questions about software tools commonly used by programmers must be **a practical, answerable problem unique to software development.** – Trenton McKinney Oct 10 '19 at 17:24

2 Answers2

22
sudo pip install svn+https://svn.code.sf.net/p/python-xlib/code/trunk/

Worked for me.

remram
  • 4,805
  • 1
  • 29
  • 42
Nolen Royalty
  • 18,415
  • 4
  • 40
  • 50
  • 3
    Alternatively you could download the tar.gz from Sourceforge and then `pip install` it (if you don't have Subversion installed, for example) – Joril Oct 31 '12 at 17:27
2

pip3 install python3-xlib

and

pip3 install python-xlib

When we run this command from the terminal, we can easily install it:

GeorgeGentlys-Mac-mini:~ georgegently$ pip3 install python3-xlib

Collecting python3-xlib
Downloading https://files.pythonhosted.org/packages/ef/c6/2c5999de3bb1533521f1101e8fe56fd9c266732f4d48011c7c69b29d12ae/python3-xlib-0.15.tar.gz (132kB)
     |████████████████████████████████| 133kB 1.3MB/s 
Installing collected packages: python3-xlib
  Running setup.py install for python3-xlib ... done
Successfully installed python3-xlib-0.15

GeorgeGentlys-Mac-mini:~ georgegently$ pip3 install python-xlib

Collecting python-xlib
Downloading https://files.pythonhosted.org/packages/f7/91/9f794491d1a8b810a9d4bb8fc9766a98354cb62bd6990685032b00f87001/python_xlib-0.25-py2.py3-none-any.whl (165kB)
     |████████████████████████████████| 174kB 1.3MB/s 
Collecting six>=1.10.0 (from python-xlib)
  Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Installing collected packages: six, python-xlib
Successfully installed python-xlib-0.25 six-1.12.0
Benjamin Loison
  • 3,782
  • 4
  • 16
  • 33