How do you install Python Xlib with pip?
Asked Answered
A

2

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?

Apoplectic answered 7/4, 2012 at 13:5 Comment(2)
pip install python-xlibVoltz
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.Sailer
O
22
sudo pip install svn+https://svn.code.sf.net/p/python-xlib/code/trunk/

Worked for me.

Operculum answered 7/4, 2012 at 13:47 Comment(1)
Alternatively you could download the tar.gz from Sourceforge and then pip install it (if you don't have Subversion installed, for example)Scrouge
S
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
Selfopinionated answered 10/10, 2019 at 16:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.