"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?
sudo pip install svn+https://svn.code.sf.net/p/python-xlib/code/trunk/
Worked for me.
pip3 install python3-xlib
and
pip3 install python-xlib
When we run this command from the terminal, we can easily install it:
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```
Related
I'm using django in a virtual environment. I'm using powershell and trying to install pyopenssl.
Inside Virtual environment:
pip version = 19.2.3
python version = 3.8.3
Outside Virtual environment:
pip version = 21.2.4
python version = 3.8.3
I tried to upgrade pip inside virtual environment using python -m pip install -U pip and pip install --upgrade pip but it is hanged without producing any output here is the screenshot.
I try pip install pyopenssl:
(bookmarks) bookmarks> pip install pyopenssl
Collecting pyopenssl
Using cached https://files.pythonhosted.org/packages/b2/5e/06351ede29fd4899782ad335c2e02f1f862a887c20a3541f17c3fa1a3525/pyOpenSSL-20.0.1-py2.py3-none-any.whl
Collecting six>=1.5.2 (from pyopenssl)
Using cached https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Collecting cryptography>=3.2 (from pyopenssl)
Using cached https://files.pythonhosted.org/packages/cc/98/8a258ab4787e6f835d350639792527d2eb7946ff9fc0caca9c3f4cf5dcfe/cryptography-3.4.8.tar.gz
Installing build dependencies ...
it hangs on Installing build dependencies .... I've waited 30mins but nothing happened.
I've also tried python -m pip install pyopenssl
(bookmarks) bookmarks> python -m pip install pyopenssl
Collecting pyopenssl
Using cached https://files.pythonhosted.org/packages/b2/5e/06351ede29fd4899782ad335c2e02f1f862a887c20a3541f17c3fa1a3525/pyOpenSSL-20.0.1-py2.py3-none-any.whl
Collecting cryptography>=3.2 (from pyopenssl)
Using cached https://files.pythonhosted.org/packages/cc/98/8a258ab4787e6f835d350639792527d2eb7946ff9fc0caca9c3f4cf5dcfe/cryptography-3.4.8.tar.gz
Installing build dependencies ... \
And when I try pip -v install pyopenssl:
(Since the ouput is large, i'm only showing the last part.)
Added semantic-version>=2.6.0 from https://files.pythonhosted.org/packages/a5/15/00ef3b7888a10363b7c402350eda3acf395ff05bebae312d1296e528516a/semantic_version-2.8.5-py2.py3-none-any.whl#sha256=45e4b32ee9d6d70ba5f440ec8cc5221074c7f4b0e8918bdab748cc37912440a9 (from setuptools-rust>=0.11.4) to build tracker 'C:\\Users\\Suhail\\AppData\\Local\\Temp\\pip-req-tracker-86fcyvxc'
Removed semantic-version>=2.6.0 from https://files.pythonhosted.org/packages/a5/15/00ef3b7888a10363b7c402350eda3acf395ff05bebae312d1296e528516a/semantic_version-2.8.5-py2.py3-none-any.whl#sha256=45e4b32ee9d6d70ba5f440ec8cc5221074c7f4b0e8918bdab748cc37912440a9 (from setuptools-rust>=0.11.4) from build tracker 'C:\\Users\\Suhail\\AppData\\Local\\Temp\\pip-req-tracker-86fcyvxc'
Installing collected packages: setuptools, wheel, pycparser, cffi, toml, semantic-version, setuptools-rust
Creating C:\Users\Suhail\AppData\Local\Temp\pip-build-env-fwbrqqmx\overlay\Scripts
Successfully installed cffi-1.14.6 pycparser-2.20 semantic-version-2.8.5 setuptools-58.1.0 setuptools-rust-0.12.1 toml-0.10.2 wheel-0.37.0
Cleaning up...
Cleaned build tracker 'C:\\Users\\Suhail\\AppData\\Local\\Temp\\pip-req-tracker-86fcyvxc'
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Getting page https://pypi.org/simple/pip/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/pip/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/pip/ HTTP/1.1" 304 0
Here again i'm stuck at this output, and pyOpenSSL is not installed.
However, pip install pyopenssl worked outside of the virtual environment screenshot
I'm stuck at this freeze for 2 days.
If you know the solution then please answer it. Thankyou
Here's what worked for me
Step 1: First I uninstalled pip:
pip uninstall pip
To make sure pip is uninstalled type pip and make sure you get ModuleNotFoundError: No module named 'pip'
Step 2: Download PIP get-pip.py:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
Step 3: Install PIP:
python get-pip.py
To make sure pip is installed run pip --version make sure it is latest, (21.2.4) as of now.
Finally I was able to install pyopenssl :))
pip install pyopenssl
I was trying to install pyttsx3 using pip on windows 10 when I get this error plus a very fat red code that I included
Collecting comtypes; platform_system == "Windows"
Using cached comtypes-1.1.7.zip (180 kB)
Using legacy setup.py install for comtypes, since package 'wheel' is not installed.
Installing collected packages: comtypes, pyttsx3
Running setup.py install for comtypes ... error```
[1]: https://i.stack.imgur.com/xRdBx.png
Try updating setup tools and then try again the install:
pip install -U setuptools
pip install pyttsx3
If it doesn't solve your issue you can also try to specify the version for pyttsx3
pip install -U pyttsx3==2.71
If this doesn't work also, try installing it directly from the official github repo:
pip install git+https://github.com/nateshmbhat/pyttsx3
If still doesn't work, consider changing your python version.
I think this will solve your issue
pip install wheel
and then,
pip install pyttsx3
So whenever I try to install anything pip throws this error:
DEVICE_NAME:~ MY_NAME$ sudo pip install pyautogui
Password:
The directory '/Users/daankoning/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/daankoning/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pyautogui
Downloading https://files.pythonhosted.org/packages/2e/83/89b5adbc37d1bbf7b486a2c1c00e8037e6f801e8c053c4897bb82d9510c6/PyAutoGUI-0.9.36.tar.gz (46kB)
100% |████████████████████████████████| 51kB 1.3MB/s
Collecting pymsgbox (from pyautogui)
Downloading https://files.pythonhosted.org/packages/b6/65/86379ede1db26c40e7972d7a41c69cdf12cc6a0f143749aabf67ab8a41a1/PyMsgBox-1.0.6.zip
Collecting PyTweening>=1.0.1 (from pyautogui)
Downloading https://files.pythonhosted.org/packages/b9/f8/c32a58d6e4dff8aa5c27e907194d69f3b57e525c2e4af96f39c6e9c854d2/PyTweening-1.0.3.zip
Collecting Pillow (from pyautogui)
Downloading https://files.pythonhosted.org/packages/df/aa/a25f211a4686f363d8ca5a1752c43a8f42459e70af13e20713d3e636f0af/Pillow-5.1.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.6MB)
100% |████████████████████████████████| 3.6MB 3.5MB/s
Collecting pyscreeze (from pyautogui)
Downloading https://files.pythonhosted.org/packages/9e/ec/e625b7c4f496977eafc441cd1f71becc8436a4ff0714263b885d269d866a/PyScreeze-0.1.14.tar.gz
matplotlib 1.3.1 requires nose, which is not installed.
matplotlib 1.3.1 requires tornado, which is not installed.
matplotlib 1.3.1 has requirement numpy>=1.5, but you'll have numpy 1.8.0rc1 which is incompatible.
Installing collected packages: pymsgbox, PyTweening, Pillow, pyscreeze, pyautogui
Running setup.py install for pymsgbox ... done
Running setup.py install for PyTweening ... done
Running setup.py install for pyscreeze ... done
Running setup.py install for pyautogui ... done
Successfully installed Pillow-5.1.0 PyTweening-1.0.3 pyautogui-0.9.36 pymsgbox-1.0.6 pyscreeze-0.1.14
You are using pip version 10.0.0b2, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
and when I then type pip install --upgrade pip it throws the same error. I've tried reinstalling pip thrice over already and I'm completely out of ideas as to what I can do.
It also does this when I try to install any other package, not jus pyautogui.
Please note that this is only on my OSX machine whilst on my PC it works perfectly fine.
There is always the option downloading a .whl-file and install it with
pip install /some-dir/some-file.whl
I have the same problems as you have with Py 3.4, so i just use Py 3.5. But I know there is no Version of PyAutoGui for 3.x. You can install this package per wheel, and if it is only this package, this'd be ok... Obviously, it does do Pillow...
I have got a problem when I want to install a specific version of a python library since I updated pip to 10.0.0. I would like to install it back but I cant find it, so I am forced to use the whole command , but it doesnt let me to install specific version of python package, any idea how to do it ?
C:\Windows\system32>python -m pip install APScheduler==3.0.0
Collecting APScheduler==3.0.0
C:\Windows\system32>python -m pip install pip APScheduler==3.0.0
Requirement already satisfied: pip in c:\program files (x86)\python36-32\lib\site-packages (10.0.0)
Collecting APScheduler==3.0.0
C:\Windows\system32>python -m pip install APScheduler==3.0.0
Collecting APScheduler==3.0.0
C:\Windows\system32>python -m pip install pymongo
Collecting pymongo
Downloading https://files.pythonhosted.org/packages/c2/96/00951e252c6cad023b3fd60457b2ab1c1329073516086c7ac1b6833a439e/pymongo-3.6.1-cp36-cp36m-win32.whl (286kB)
100% |████████████████████████████████| 286kB 1.3MB/s
Installing collected packages: pymongo
Successfully installed pymongo-3.6.1
also this is the part of a pip error I am dealing with , so any help would be awesome ^.^ ( Tried few things from stack overflow but neighter of them worked )
C:\Windows\system32>pip install APScheduler==3.0.0
Fatal error in launcher: Unable to create process using '""c:\program files (x86)\python36-32\python.exe" "C:\Program Files (x86)\Python36-32\Scripts\pip.exe" install APScheduler==3.0.0'
Try using the --upgrade flag.
python -m pip install --upgrade APScheduler==3.0.0
It should work for downgrades as well
Make sure that both python.exe and pip are available in the locations in which it is looking for them. The pip launcher program is failing to run the command that it's printing in the error, which is probably because it can't find the relevant files.
Alternatively, just run pip using python -m pip which seems to work fine.
I am getting an error while attempting to use Pyinstaller. After doing some research I believe the error is caused by a bug in the most recent version of setuptools (19.3). The fix seems to be downgrading to setuptools version 19.2. My issue is with the downgrade itself. My question is how does one downgrade setuptools in Ubuntu 15.04?
Just specify the version using pip:
pip install setuptools==19.2
If you are installing globally you will obviously need sudo.
~$ sudo pip install setuptools==19.2
Collecting setuptools==19.2
Downloading setuptools-19.2-py2.py3-none-any.whl (463kB)
100% |████████████████████████████████| 466kB 486kB/s
Installing collected packages: setuptools
Found existing installation: setuptools 19.1
Uninstalling setuptools-19.1:
Successfully uninstalled setuptools-19.1
Successfully installed setuptools-19.2
~$ sudo pip install setuptools==19.1
Collecting setuptools==19.1
Downloading setuptools-19.1-py2.py3-none-any.whl (463kB)
100% |████████████████████████████████| 466kB 377kB/s
Installing collected packages: setuptools
Found existing installation: setuptools 19.2
Uninstalling setuptools-19.2:
Successfully uninstalled setuptools-19.2
Successfully installed setuptools-19.1